> For the complete documentation index, see [llms.txt](https://docs.i18nifty.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.i18nifty.dev/api-reference/gettranslation.md).

# getTranslation

It's like useTranslation but it's not a hook, it can be used outside of React. &#x20;

```typescript
const { getTranslation } = createI18nApi(...);

const { t } = getTranslation("MyComponent");  

t("greating", { "who": "Jhon" });
```

{% hint style="warning" %}
Be mindfull, local resources are downloaded lazyly in with [asynchronous locale download](/asynchronous-locale-resources-download.md).\
If the resources aren't downloaded yet you'll get empty strings.  \
Also you have to subscribe to language changes to get the updated values.
{% endhint %}
