1.1.0 • Published 1 year ago

tolgi18next v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

{% import "../../readmeMacros/macros.njk.md" as macros %}

{{ macros.header('Tolgee i18next integration', 'A package enabling you to use i18next with Tolgee', packageName) }}

What's the Tolgee i18next package?

Using i18next, but want to use cool Tolgee features like in-context editing or automated screenshot generation? No worries. Tolgee i18next integration is here for you!

{{ macros.integrationLinks('Tolgee i18next docs', macros.v5link('integrations/i18next/installation')) }}

{{ macros.installation('i18next') }}

Usage

First, create a Tolgee instance and wrap your i18next instance withTolgee.

import i18n from 'i18next';
import { withTolgee, Tolgee, I18nextPlugin, FormatSimple } from '@tolgee/i18next';

const tolgee = Tolgee()
  .use(I18nextPlugin())
  .use(FormatSimple())
  .init({
    apiUrl: ...,
    apiKey: ...,
  });

withTolgee(i18n, tolgee)
  .use(...)
  .init(...)

Language changing

Tolgee will automatically switch language accordingly to i18next. So to get current language do:

const lang = i18n.lang;

To set language:

i18n.changeLanguage(lang);

To learn more, check Tolgee documentation.

{{ macros.why() }}

Development

{{ macros.developmentInstallation() }} {{ macros.development('react-i18n') }}

{{ macros.developmentTesting('/packages/i18next') }}

{{ macros.contributors() }}

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago