Skip to main content

Tolgee for React provides simple API to create multi-lingual React application. With Tolgee i18n library for React you can enjoy all Tolgee i18n features.

To see React with Tolgee in action, check this example app.

npm i @tolgee/react

Get started!

1. Create project in Tolgee platform

Go to Tolgee Cloud app or access your self-hosted instance and create a project. Then obtain your API key.

2. Setup Tolgee integration

Install the npm packages.

npm i @tolgee/react

Then wrap your code with TolgeeProvider

import { TolgeeProvider } from "@tolgee/react";
export const Wrapper = () => {
return (
<TolgeeProvider
filesUrlPrefix="i18n/"
apiUrl="https://app.tolgee.io"
apiKey="<your api key>"
loadingFallback="Loading..."
>
<App />
</TolgeeProvider>
);
}

3. Use T component to translate your texts

import { T } from "@tolgee/react";

export const Component = () => {
return (
<h1>
<T keyName="translate_me">Translate me!</T>
</h1>
)
}

Now you are able to Alt + Click & translate your texts!

More integrations

Show all