indexFunctions
Function: generateJsonInkTranslation()
> generateJsonInkTranslation(pixivnJson, json?, options?): Promise<object>
Defined in: src/functions/translate.ts:38
Generate a json object with the keys of the labels and the values of the text to be translated
Parameters
pixivnJson
The labels to be used in the narrative. They will be added to the system
json?
object = {}
If you want to add more keys to the existing json
options?
The options to set the default value if the key is not found
defaultValue?
"empty_string" | "copy_key"
Default value to set if the key is not found
Default
"copy_key"
Returns
Promise<object>
The json object with the keys of the labels and the values of the text to be translated
Example
import { generateTranslateJson, importInkText } from 'pixi-vn-ink'
importInkText( your_ink_text_here ).then((labels) => {
let json = generateTranslateJson(labels)
})