indexFunctions
Function: onInkTranslate()
> onInkTranslate(t): void
Defined in: src/functions/translate.ts:19
This function set the function to translate the text
Parameters
t
(text) => string
The function to translate the text
Returns
void
Example
import { onInkTranslate } from 'pixi-vn-ink'
import { useTranslation } from "react-i18next";
const { t } = useTranslation(["narration"]);
onInkTranslate((text) => {
return t(text)
})