LogoPixi’VN
indexNamespacestranslatorFunctions

Function: generateJsonTranslation()

> generateJsonTranslation(labels, json?, options?): Promise<object>

Defined in: src/translator/TranslatorManager.ts:195

Generates a JSON translation object from the provided labels.

Parameters

labels

PixiVNJsonLabelStep[]

The labels to translate.

json?

object = {}

The JSON object to populate with translations.

options?

Options for translation, including default value handling.

defaultValue?

"empty_string" | "copy_key"

Default value to use when a key is not found.

  • "empty_string": Use an empty string as the default value.
  • "copy_key": Use the key itself as the default value.

Default

"copy_key"

operationStringConvert?

(value, step, props) => Promise<PixiVNJsonOperation | undefined>

Returns

Promise<object>

The populated JSON object with translations.

On this page