getTranslation
Use the translation function outside of React components.
It's like useTranslation but it's not a hook, it can be used outside of React.
const { getTranslation } = createI18nApi(...);
const { t } = getTranslation("MyComponent");
t("greating", { "who": "Jhon" });Last updated
Was this helpful?