Tolgee i18next API Reference
Full integration
function withTolgee(i18next, tolgee)
Ensures complete integration between i18next and Tolgee.
i18next
- the i18next instancetolgee
- ATolgeeInstance
Custom integration
For more granular control over the integration process, you can use the following functions individually instead of withTolgee
.
function tolgeeBackend(tolgee)
Creates a Tolgee backend plugin for i18next.
tolgee
- A Tolgee instance
function tolgeeProcessor(tolgee)
Creates a Tolgee postProcessor plugin for i18next. Applies wrapping to each translation, making it detectable for in-context translation in development mode.
tolgee
- A Tolgee instance
function tolgeeApply(tolgee, i18next)
Registers necessary callbacks (tolgee.onTranslationChange
and i18next.on('languageChanged')
) on both Tolgee instance and i18next.
tolgee
- A Tolgee instancei18next
- An i18next instance
function tolgeeOptions(options)
Extends i18next's InitOptions
with options necessary for Tolgee to function properly. This includes enabling the tolgeeProcessor
globally and also reacting to store added
event to refresh the UI when translations are changed through in-context translation.
options
- i18nextInitOptions