Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion authors/archie.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ avatar: /static/avatars/archie.png
occupation: CEO
company: General Translation
email: archie@generaltranslation.com
twitter: https://x.com/archiemckenzie_/photo
twitter: https://x.com/archiemckenzie_
linkedin: https://www.linkedin.com/in/archie-mckenzie
---

Expand Down
1 change: 1 addition & 0 deletions authors/default.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Team
avatar: /static/avatars/logo.png
occupation: Team
company: General Translation
email: archie@generaltranslation.com
twitter: https://x.com/generaltxn
Expand Down
1 change: 1 addition & 0 deletions authors/jackie.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Jackie Chen
avatar: /static/avatars/jackie.png
occupation: Software Engineer
company: General Translation
email: jackie@generaltranslation.com
twitter: https://x.com/Some_Jackie
Expand Down
8 changes: 4 additions & 4 deletions blog/en-US/best-localization-software.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ General Translation is not a library. It's not a TMS. It's the whole pipeline, u

- **Open-source developer libraries**: [`gt-next`](https://generaltranslation.com/docs/react/nextjs), [`gt-react`](https://generaltranslation.com/docs/react), and support for [React Native/Expo](https://generaltranslation.com/docs/react/react-native). Drop-in SDKs with full TypeScript support.
- **An AI-first translation platform** that understands your codebase, your product, and your terminology. Not generic machine translation bolted on top.
- **Locadex, the AI agent**: an [automated internationalization engineer](https://generaltranslation.com/docs/locadex) that scans your codebase, internationalizes your code, creates translations, and opens pull requests on every push.
- **Locadex, the AI agent**: an [automated internationalization engineer](https://generaltranslation.com/docs/platform/locadex) that scans your codebase, internationalizes your code, creates translations, and opens pull requests on every push.

Building both the library and the translation engine together makes localization ten times easier. No JSON export/import, no file management, no agencies to coordinate. Translations flow directly from your source code to production.

Expand Down Expand Up @@ -58,7 +58,7 @@ At 10 languages and 500 keys, that's 5,000 entries to maintain. At 50 languages

## How General Translation closes the loop

**1. Install and write code.** Run the [setup wizard](https://generaltranslation.com/docs/next/quickstart) and wrap content in `<T>` components. No key extraction. No JSON files.
**1. Install and write code.** Run the [setup wizard](https://generaltranslation.com/docs/react/nextjs-quickstart) and wrap content in `<T>` components. No key extraction. No JSON files.

```tsx
import { T } from 'gt-next';
Expand All @@ -75,9 +75,9 @@ export default function Home() {

**2. Develop.** Translations appear on-demand. Switch languages and see results immediately.

**3. Ship.** One command generates all translations at build time. They're pre-generated, cached, and delivered via CDN. Sub-50ms globally. [See the deploy guide →](https://generaltranslation.com/docs/next/quickstart#deploy)
**3. Ship.** One command generates all translations at build time. They're pre-generated, cached, and delivered via CDN. Sub-50ms globally. [See the deploy guide →](https://generaltranslation.com/docs/react/nextjs-quickstart)

**4. Automate.** [Locadex](https://generaltranslation.com/docs/locadex) monitors your repo. When you push code, it scans for changes, internationalizes new content, generates translations, and opens a PR. No human in the loop unless you want one. If you do, the translation editor gives you side-by-side diffs with the ability to edit before or after content goes live.
**4. Automate.** [Locadex](https://generaltranslation.com/docs/platform/locadex) monitors your repo. When you push code, it scans for changes, internationalizes new content, generates translations, and opens a PR. No human in the loop unless you want one. If you do, the translation editor gives you side-by-side diffs with the ability to edit before or after content goes live.

## Why most translation AI gets it wrong

Expand Down
2 changes: 1 addition & 1 deletion blog/en-US/branch_vs_ternary.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ There are two arguments for why this is a mistake, especially in the context of
Meaning is not only embedded in the words but also in how words are presented.
The word "back", if located on a back arrow, probably means something very different than the word "back" on a chiropractor's resume.
Additionally, without a larger context, translators (even human ones) might have difficulty translating the word correctly.
There's a famous story of WhatsApp's i18n department translating the word "crop" on an image editor tool to "crop" as in farming in German.
There's a famous story of WhatsApp's i18n team translating the word "crop" on an image editor tool into the German word for crop as in farming, instead of the word for image cropping.

To get around this context issue, we can pass information about the presentation of content with the `<T>` and `<Branch>` components.
In our example, this would give our "translator" a larger picture of what "on" and "off" means.
Expand Down
10 changes: 5 additions & 5 deletions blog/en-US/gt-next.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tags: ['guide', 'internationalization', 'nextjs', 'gt-next']

**Internationalization (i18n) sucks. We're building a Next.js library, gt-next, to make it easier.** Today we're launching it in open beta.

``` copy
```bash copy
npm i gt-next
```

Expand Down Expand Up @@ -40,9 +40,9 @@ The goal with gt-next is to create an abundance mindset around translations. The
- Get an API key 🔐 on our [platform](https://generaltranslation.com)
- Read the [docs](https://generaltranslation.com/docs) 📄

### What you can do with gt-next
## What you can do with gt-next

#### Format variables and plurals
### Format variables and plurals

```javascript copy
import { T } from 'gt-next'
Expand All @@ -67,14 +67,14 @@ export default function Page() {
}
```

#### Use a developer API key to see translations locally
### Use a developer API key to see translations locally

```.env copy
GT_API_KEY="gtx-dev-cae62d6fe1e33bda603c9a2926ab0fb8"
GT_PROJECT_ID="abcdef12-3456-789a-bcd4-ef123456789a"
```

#### Support over 100 languages out of the box, with on-demand translation.
### Support over 100 languages out of the box, with on-demand translation.

![landing](/images/blogs/landing.png)

Expand Down
4 changes: 1 addition & 3 deletions blog/en-US/i18n-without-translation-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ authors: [jackie]
tags: ['guide', 'internationalization', 'nextjs', 'i18n', 'gt-next', 'translation-files', 'developer-experience']
---

import Video from '@/components/Video';

Everyone who's internationalized a JavaScript app knows the workflow. You install an i18n library, create an `en.json` file, pull every user-facing string out of your components, assign each one a key, and reference the key where the string used to be. Then you duplicate that JSON file for every language you support. `es.json`, `fr.json`, `ja.json`.

At first, it's fine. Thirty strings, three languages, 90 entries.

Then your app grows. Six months later you have 400 strings and 12 languages. 4,800 entries across a dozen files. A developer adds a new feature, writes five new strings, forgets to update three of the translation files. Nobody notices until a user in Tokyo sees English fallbacks in a Japanese interface. Someone suggests buying a translation management system.

<Video src='https://assets.gtx.dev/i18n-no-translation.mp4' />
[Watch a short walkthrough](https://assets.gtx.dev/i18n-no-translation.mp4)

## The file management tax

Expand Down
4 changes: 2 additions & 2 deletions blog/en-US/multilingual-nextjs-seo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Search engines need separate, crawlable URLs to index each language version inde

This means **locale-in-the-URL** — not cookies, not query parameters, not `Accept-Language` detection alone.

```
```text
✅ generaltranslation.com/en/about
✅ generaltranslation.com/fr/about
✅ generaltranslation.com/es/about
Expand All @@ -46,7 +46,7 @@ This means **locale-in-the-URL** — not cookies, not query parameters, not `Acc

First, nest your pages under a `[locale]` dynamic segment:

```
```text
app/
└── [locale]/
├── layout.tsx
Expand Down
10 changes: 5 additions & 5 deletions blog/en-US/nextjs-i18n-code-is-the-source-of-truth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The syntax above comes from [gt-next](https://generaltranslation.com/docs/react/
npx gt@latest init
```

The [setup wizard](https://generaltranslation.com/docs/cli/init) installs dependencies, wraps your Next.js config with [`withGTConfig`](https://generaltranslation.com/docs/next/api/config/with-gt-config), adds [`GTProvider`](https://generaltranslation.com/docs/react/reference/components/gt-provider) to your root layout, creates a [`gt.config.json`](https://generaltranslation.com/docs/cli/reference/config) with your locales, sets up dev API keys for translation hot reloading, and configures CDN translation storage — all interactively.
The [setup wizard](https://generaltranslation.com/docs/cli/reference/commands/init) installs dependencies, wraps your Next.js config with [`withGTConfig`](https://generaltranslation.com/docs/react/nextjs/config), adds [`GTProvider`](https://generaltranslation.com/docs/react/reference/components/gt-provider) to your root layout, creates a [`gt.config.json`](https://generaltranslation.com/docs/cli/reference/config) with your locales, sets up dev API keys for translation hot reloading, and configures CDN translation storage — all interactively.

Once that's done, wrap content in `<T>`, run your dev server, and use the [`<LocaleSelector>`](https://generaltranslation.com/docs/react/reference/components/locale-selector) component to switch between languages:

Expand Down Expand Up @@ -83,7 +83,7 @@ The [`translate`](https://generaltranslation.com/docs/cli/reference/commands/tra

## Next steps

- [Variable components](https://generaltranslation.com/docs/react/guides/format-variables) — handle dynamic content inside `<T>` with [`<Var>`](https://generaltranslation.com/docs/react/reference/components/var), [`<Num>`](https://generaltranslation.com/docs/react/reference/components/num), and [`<Currency>`](https://generaltranslation.com/docs/react/reference/components/currency)
- [Branching components](https://generaltranslation.com/docs/react/guides/plurals-and-branches) — conditionally render content based on locale with [`<Plural>`](https://generaltranslation.com/docs/react/reference/components/plural) and [`<Branch>`](https://generaltranslation.com/docs/react/reference/components/branch)
- [`useGT`](https://generaltranslation.com/docs/react/reference/hooks/use-gt) and [`getGT`](https://generaltranslation.com/docs/react/reference/functions/get-gt) — translate plain strings for attributes, placeholders, and metadata
- [Standalone mode](https://generaltranslation.com/docs/react/guides/local-translations) — use gt-next without the General Translation platform
- [Variable components](https://generaltranslation.com/docs/react/guides/formatting-variables) — handle dynamic content inside `<T>` with [`<Var>`](https://generaltranslation.com/docs/react/reference/components/var), [`<Num>`](https://generaltranslation.com/docs/react/reference/components/num), and [`<Currency>`](https://generaltranslation.com/docs/react/reference/components/currency)
- [Branching components](https://generaltranslation.com/docs/react/guides/handling-plurals-and-branches) — conditionally render content based on locale with [`<Plural>`](https://generaltranslation.com/docs/react/reference/components/plural) and [`<Branch>`](https://generaltranslation.com/docs/react/reference/components/branch)
- [`useGT`](https://generaltranslation.com/docs/react/reference/hooks/use-gt) and [`getGT`](https://generaltranslation.com/docs/react/nextjs/reference/functions/get-gt) — translate plain strings for attributes, placeholders, and metadata
- Standalone mode — use gt-next without the General Translation platform
8 changes: 4 additions & 4 deletions blog/en-US/plurals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ layout: PostLayout

We often encounter apps that display awkward messages like:

```
```text
You have 1 new message(s)
```

Expand Down Expand Up @@ -87,7 +87,7 @@ pluralize(2, 'child', 'children') // "children"

But what if you need more complicated logic, like:

```
```text
"No one is watching"
"1 person is watching"
"2 people are watching"
Expand Down Expand Up @@ -168,7 +168,7 @@ languages like Arabic and Polish have more than just these two forms.

For example, an English-speaking user might expect:

```
```text
"No one is watching"
"1 person is watching"
"2 people are watching"
Expand All @@ -177,7 +177,7 @@ For example, an English-speaking user might expect:
Whereas an Arabic-speaking user might expect different expressions for singular,
dual (when the count is exactly two things), and small and large plural forms:

```
```text
"لا أحد يشاهد"
"1 شخص يشاهد"
"2 شخصان يشاهدان"
Expand Down
4 changes: 2 additions & 2 deletions devlog/en-US/gt-i18n_v0_1_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Though `generaltranslation` is also a runtime-agnostic library, it is—by desig

## What's Included

- **[`msg()`](#)** - String registration and variable interpolation
- **[`mFallback()`](#)** and **[`gtFallback()`](#)** - Migration helpers for incremental adoption
- **`msg()`** - String registration and variable interpolation
- **`mFallback()`** and **`gtFallback()`** - Migration helpers for incremental adoption

---

Expand Down
2 changes: 1 addition & 1 deletion devlog/en-US/gt-next_v6_3_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function Page() {

To support interpolation, the `msg()` function returns an encoded message instead of a plain string. The format looks like this:

```
```text
<interpolated content>:<base64 encoded string>
```

Expand Down
4 changes: 1 addition & 3 deletions devlog/en-US/gt-react_v10_15_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ authors: [ernest]
tags: ['gt-react', 'derive', 'tagged-template', 'i18n']
---

import Video from '@/components/Video';

## The `declareStatic()` → `derive()` rename

This release is the first to ship with the new `derive()` name. Previously, this function was called `declareStatic()` and the JSX component was `<Static>`. In [PR #1062](https://github.com/generaltranslation/gt/pull/1062), both were renamed to `derive()` and `<Derive>` for clarity.

<Video src='https://assets.gtx.dev/derive-animation.mp4' />
[Watch a short walkthrough](https://assets.gtx.dev/derive-animation.mp4)

## Overview

Expand Down
2 changes: 1 addition & 1 deletion devlog/en-US/gt-react_v10_18_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function StatusMessage({ isMasculine }) {

At build time, the CLI sees the `derive()` call and registers two separate source entries, each producing its own translation:

```
```text
"I am tired" ($context: "inflect as masculine") → "Estoy cansado"
"I am tired" ($context: "inflect as feminine") → "Estoy cansada"
```
Expand Down
4 changes: 1 addition & 3 deletions devlog/en-US/gt-react_v10_19_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ authors: [ernest]
tags: ['gt-react', 'browser', 'hot-reload', 'dev-experience', 'i18n']
---

import Video from '@/components/Video';

<Video src='https://assets.gtx.dev/devlogs/gt-react-browser-tx-hot-reload.mp4' />
[Watch a short walkthrough](https://assets.gtx.dev/devlogs/gt-react-browser-tx-hot-reload.mp4)

## Overview

Expand Down
4 changes: 1 addition & 3 deletions devlog/en-US/react-core-linter_v0_1_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ tags: ['react-core-linter', '0.1.0', 'eslint', 'linting', 'static-validation']

This plugin catches common implementation errors that we have seen in the wild.

import Video from '@/components/Video';

<Video src='https://assets.gtx.dev/docs/react-core-linter/web-0.1.0.mp4' />
[Watch a short walkthrough](https://assets.gtx.dev/docs/react-core-linter/web-0.1.0.mp4)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/overview/for-coding-agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Give your agent everything it needs in one paste. Copy the guide below into an `
````markdown title="AGENTS.md"
# General Translation — agent guide

Instructions for AI coding agents adding [General Translation](https://generaltranslation.com) to a project. General Translation is a full-stack localization product: open-source i18n libraries plus a CLI that translate an app and its content into any language. Follow these rules when internationalizing code or wiring up translations.
Instructions for AI coding agents adding [General Translation](https://generaltranslation.com) to a project. General Translation is a full-stack localization product: open-source i18n libraries plus a CLI that translates an app and its content into any language. Follow these rules when internationalizing code or wiring up translations.

## What to use

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/overview/key-concepts.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

title: Key concepts
description: "Understanding the core concepts behind General Translation: including internationalization, localization, translation, locales, and context"
description: "Understanding the core concepts behind General Translation: including internationalization, localization, translation, locales, and context."

---

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/core/guides/locale-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Locale codes tell General Translation what language a source file is written in,

## How locale codes work [#locale-codes-work]

General Translation uses the **[BCP 47 Language Tag](https://www.techonthenet.com/js/language_tags.php)** standard to define locale codes. This Internet Best Current Practices (BCP) standard for languages defines a uniform way to specify both spoken and written languages.
General Translation uses the **[BCP 47 Language Tag](https://www.techonthenet.com/js/language_tags.php)** standard to define locale codes. This Internet Best Current Practice (BCP) standard for languages defines a uniform way to specify both spoken and written languages.

A locale code can include several subtags separated by the `-` character:

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/core/guides/translating-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ related:

---

The `generaltranslation` library can translate full source files. This page explains how to upload, enqueue, status, and download workflows for files.
The `generaltranslation` library can translate full source files. This page explains how to upload a source file, enqueue translation, check status, and download the translated file.

## Before you start [#before-start]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const gt = new GT({
projectId: 'my-project-id',
apiKey: 'my-api-key',
targetLocale: 'es',
customMapping: { 'en-US': { name: 'Mandarin', emoji: '🇫🇷' } },
customMapping: { zh: { name: 'Mandarin', emoji: '🇨🇳' } },
});
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ General Translation applies reusable translation instructions through Context Gr

a) **Glossary** defines **key terms**: product and brand names, features, and technical terms. *Example: Locadex is the GT agent. This product name should never be translated.*

b) **Directives** define **style and tone**: audience, formality, conventions, and formatting. *Example: Use active voice, avoid jargon, and use formal “sie”*
b) **Directives** define **style and tone**: audience, formality, conventions, and formatting. *Example: Use active voice, avoid jargon, and use formal “Sie”*

All Context Groups are stored at the Organization-wide level. They can then be applied to one or more Projects.

Expand Down Expand Up @@ -97,7 +97,7 @@ When you create a Context Group from a Project, it is still created at the Organ

In most cases, you should directly assign or reassign Projects to Context Groups.

However, for major changes, you can also use **Export** to download a group's Glossary and Directives. Then use **Import** to fill an empty Glossary and Directive fields from a supported file.
However, for major changes, you can also use **Export** to download a group's Glossary and Directives. Then use **Import** to fill empty Glossary and Directives fields from a supported file.

## Set priority when groups overlap [#priority]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/dashboard/guides/managing-billing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Each free organization gets 5M free translation credits to start. You will be r

## Usage-based billing [#usage]

You pay per workflow: cost is based on number of input tokens, workflow type (buildtime, runtime, or development), file format, and any context you provide.
You pay per workflow: cost is based on the number of input tokens, workflow type (build-time, runtime, or development), file format, and any context you provide.

### Base workflow rates [#base-rates]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Use a stable prefix so Locadex branches are easy to find in GitHub.

Use the toggle buttons to control how Locadex creates and manages pull requests:

- **Auto-merge PRs** merges Locadex pull requests automatically when checks pass. See more information at [Auto-merge Locadex PRs.](/docs/platform/locadex/guides/auto-merging-prs)
- **Auto-merge PRs** merges Locadex pull requests automatically when checks pass. See more information at [Auto-merge Locadex PRs](/docs/platform/locadex/guides/auto-merging-prs).
- **Run on exact content changes** narrows Locadex’s relevance check for the Codegen workflow. When enabled, Locadex checks only the changed lines in the diff. When disabled, it may check the full modified file. This setting does not affect the Translation or Locales workflows.
- **Save local edits** preserves manual translation edits before Locadex runs.

Expand Down
Loading
Loading