An open API service indexing awesome lists of open source software.

https://github.com/general-translation/gt-libraries

⚛️ A developer friendly one stop shop to internationalization 🌐
https://github.com/general-translation/gt-libraries

i18n internationalization javascript l10n localization nextjs react translation translations

Last synced: 6 months ago
JSON representation

⚛️ A developer friendly one stop shop to internationalization 🌐

Awesome Lists containing this project

README

          



General Translation

# Overview

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](https://generaltranslation.com)!

Full documentation, including guides, examples, and API references, can be found in the [docs](https://generaltranslation.com/docs).

Join our [Discord community](https://discord.gg/W99K6fchSu) to get help and stay updated!

## Library Features

### ⚛️ Translate entire React components, not just strings

- Just wrap your content in a `` component!
- No need for complex refactoring or messy function calls.

```tsx
export default function Page() {
return (

You can write any JSX as children of the {''} component.



For example, you could write a link and have the text be
translated in context.




Even deeply nested components are translated in context.


Click me!



);
}
```

### 🔎 Feature parity with existing libraries

- GT libraries also support the same features as existing libraries like `i18next`, `react-intl`, and `next-intl`.
- Features such as dictionaries, plurals, currencies, and automatic routing are all supported.

### 🔧 Developer-friendly

- 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!

### 🧠 Free AI-powered translation service

- Translation hot reload in development
- 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.

## Examples

See the [examples](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:

```tsx
There is {count} item>}
plural={<>There are {count} items>}
/>
```

Support for translation at runtime:

```tsx
export default function Comment() {
const comment = await getComment();

return (

Author: {comment.author}



{comment.content}



);
}
```

Intuitive i18n formatting syntax:

```tsx
return (

Your account information:


Account balance: {account.bal} // Currency Formatting


Updated at: {account.updateTime} // Datetime Formatting


Transactions this month: {account.txCount} // Number Formatting

);
```

## Libraries

See the below for links to the relevant libraries:

- [gt-next](packages/next/README.md): Automatic i18n for Next.js
- [gt-react](packages/react/README.md): Automatic i18n for React
- [generaltranslation](packages/core/README.md): Core library for General Translation
- [supported-locales](packages/supported-locales/README.md): Currently supported locales
- [gtx-cli](packages/cli/README.md): CLI tool for React apps

## Installation

Any of the libraries can be installed via npm, yarn, pnpm, or bun.

For example, to install `gt-next`:

```bash
npm install gt-next
yarn add gt-next
```

Usage of the libraries is documented on our [docs](https://generaltranslation.com/docs).

## Contributing

We welcome any contributions to our libraries. Please submit a pull request!