Introduction
Docs for General Translation's localization libraries
Welcome to the docs for General Translation (GT).
We publish developer libraries for React and Next.js apps which automate your entire internationalization (i18n) stack.
- Setup is simple, with no need for complex rewrites of your project.
- Translations ship in seconds and load in milliseconds.
- UI gets translated in context by powerful AI models.
These docs are under construction. Please email archie@generaltranslation.com if what you're looking for isn't here.
Get started
Example
Why choose General Translation?
General Translation is an entire i18n stack, from developer libraries, to AI translations, to the infrastructure that serves translated content.
With GT libraries like gt-react
and gt-next
, you can:
1. Translate entire React components, not just strings
UI passed as the children of the <T>
component will be translated regardless of how complicated the JSX tree. For example:
2. Translate both client and server components
With first class support for the Next.js App Router and React Server Components.
3. Write content inline or in dictionaries
JSX content placed inside a <T>
component is marked for translation:
Many projects have a central dictionary in which they store all translatable content. Uniquely, General Translation libraries let you write dictionaries as objects containing JSX:
4. Translate content on-demand
No need to guess which languages your users will need. General Translation can create translations on-demand, during runtime.
This can happen if:
- A requested language has never been seen before
- Some cases where the content of a component cannot be known until render time
In this situation, gt-next
and gt-react
can create a translation for you on demand, while your app is running.
Once the translation is loaded, it will rewrite your component in real time with the new translation content.
We recommend using the CLI tool to create translations in advance, rather than relying on on-demand translations.