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



\> **translate**(`key`): `string`

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

Runs the composed translation pipeline:

1. optional `beforeToTranslate` hook (deprecated)
2. [TextReplaces.replace](/pixi-vn-json/index/namespaces/TextReplaces/functions/replace) – before-translation phase
3. main `translate` function
4. optional `afterToTranslate` hook (deprecated)
5. [TextReplaces.replace](/pixi-vn-json/index/namespaces/TextReplaces/functions/replace) – after-translation phase

## Parameters [#parameters]

### key [#key]

`string`

## Returns [#returns]

`string`
