# Function: generateJsonTranslation() (/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/f2528001a05fe854a897e0c1d03c7e311fe08af2/src/translator/TranslatorManager.ts#L195)

Generates a JSON translation object from the provided labels.

## Parameters [#parameters]

### labels [#labels]

[`PixiVNJsonLabelStep`](/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`](/pixi-vn-json/index/type-aliases/PixiVNJsonOperation) | `undefined`>

## Returns [#returns]

`Promise`\<`object`>

The populated JSON object with translations.
