General Translation is a one-stop solution for all your translation needs. It includes:
- A set of libraries for React and Next.js
- A translation platform
- A free AI-powered translation service
With General Translation, you never need to worry about localization again. Just install the libraries in your project, wrap your content as you code, and we'll take care of the rest.
With General Translation, you can internationalize your entire app in minutes.
Get started at generaltranslation.com!
Full documentation, including guides, examples, and API references, can be found in the docs.
Join our Discord community to get help and stay updated!
- Just wrap your content in a
<T>
component! - No need for complex refactoring or messy function calls.
export default function Page() {
return (
<T>
<p>You can write any JSX as children of the {'<T>'} component.</p>
<p>
For example, you could write a <a href='/'>link</a> and have the text be
translated in context.
</p>
<div>
<div>
<p>Even deeply nested components are translated in context.</p>
<button>Click me!</button>
</div>
</div>
</T>
);
}
- GT libraries also support the same features as existing libraries like
i18next
,react-intl
, andnext-intl
. - Features such as dictionaries, plurals, currencies, and automatic routing are all supported.
- Setup is simple and can be done in minutes.
- All GT libraries are open-source and work standalone.
- You can use your own translation provider or use our free AI-powered translation service.
- No more wasting time managing translation keys like
t('menu.header.title')
.- Just write everything in-line!
- Libraries integrate natively with our translation platform.
- Translations are generated for your app in seconds.
- HTML content is re-arranged and customized according to the language.
- Translations are generated on-demand, so you can view them in real-time in development.
See the examples directory for some example projects that use our libraries. We currently support React and Next.js.
Simple interface for native pluralization and conditional logic:
<Plural
n={count}
singular={<>There is {count} item</>}
plural={<>There are {count} items</>}
/>
Support for translation at runtime:
export default function Comment() {
const comment = await getComment();
return (
<h1>Author: {comment.author}</h1>
<Tx>
<p>{comment.content}</p>
</Tx>
);
}
Intuitive i18n formatting syntax:
return (
<T>
<h1> Your account information: </h1>
Account balance: <Currency>{account.bal}</Currency> // Currency Formatting
<br />
Updated at: <DateTime>{account.updateTime}</DateTime> // Datetime Formatting
<br />
Transactions this month: <Num>{account.txCount}</Num> // Number Formatting
</T>
);
See the below for links to the relevant libraries:
- gt-next: Automatic i18n for Next.js
- gt-react: Automatic i18n for React
- generaltranslation: Core library for General Translation
- supported-locales: Currently supported locales
- gt-react-cli: CLI tool for React apps
- gt-next-cli: CLI tool for Next.js apps
Any of the libraries can be installed via npm, yarn, pnpm, or bun.
For example, to install gt-next
:
npm install gt-next
yarn add gt-next
Usage of the libraries is documented on our docs.
We welcome any contributions to our libraries. Please submit a pull request!