Skip to main content

Installation (i18next)

To install Tolgee i18next integration library run:

npm install i18next @tolgee/i18next

To install UI bundle for in-context translating you will also need to install package @tolgee/ui.

npm install @tolgee/ui

Then wrap your i18next instance withTolgee:

import i18n from 'i18next';import { withTolgee } from '@tolgee/i18next';
withTolgee(i18n, {  apiUrl: ...,  apiKey: ...,  ui: ...,  ...})  .use(...)  .init(...)

Now you can use regular i18next translation features.

Language detection/changes#

Tolgee will follow i18next configuration, so you can use i18next language detectors or set the language manually.

To change language use i18next.changeLanguage function.