# Function: onInkTranslate() (/jsdoc/pixi-vn-ink/index/functions/onInkTranslate)



\> **onInkTranslate**(`t`): `void`

Defined in: [src/functions/translate.ts:19](https://github.com/DRincs-Productions/pixi-vn-ink/blob/cf876d4db655e65b32a20a362a828ecba73f4786/src/functions/translate.ts#L19)

This function set the function to translate the text

Parameters [#parameters]

t [#t]

(`text`) => `string`

The function to translate the text

Returns [#returns]

`void`

Example [#example]

```ts
import { onInkTranslate } from 'pixi-vn-ink'
import { useTranslation } from "react-i18next";

const { t } = useTranslation(["narration"]);
onInkTranslate((text) => {
   return t(text)
})
```
