# Function: generateJsonTranslation() (/jsdoc/pixi-vn-json/index/namespaces/translator/functions/generateJsonTranslation)



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

Defined in: [src/translator/TranslatorManager.ts:195](https://github.com/DRincs-Productions/pixi-vn-json/blob/c3fc7ababe09c261f3130ab586feb49b5a221ace/src/translator/TranslatorManager.ts#L195)

Generates a JSON translation object from the provided labels.

## Parameters [#parameters]

### labels [#labels]

[`PixiVNJsonLabelStep`](/jsdoc/pixi-vn-json/index/type-aliases/PixiVNJsonLabelStep)\[]

The labels to translate.

### json? [#json]

`object` = `{}`

The JSON object to populate with translations.

### options? [#options]

Options for translation, including default value handling.

#### defaultValue? [#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**

```ts
"copy_key"
```

#### operationStringConvert? [#operationstringconvert]

(`value`, `step`, `props`) => `Promise`\<[`PixiVNJsonOperation`](/jsdoc/pixi-vn-json/index/type-aliases/PixiVNJsonOperation) | `undefined`>

## Returns [#returns]

`Promise`\<`object`>

The populated JSON object with translations.
