Skip to content
Open
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
2 changes: 1 addition & 1 deletion blog/en-US/ai-chatbot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const gt = useGT();

That was it! All of the text in the chatbot was now internationalized and available in any language.

## Deploying to Production
## Deploying to production

Deploying to production was even easier. I swapped out my `GT_API_KEY` environment variable with a production API key and ran the translate command:

Expand Down
4 changes: 2 additions & 2 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 @@ -69,7 +69,7 @@ export default function Page() {

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

```.env copy
```env copy
GT_API_KEY="gtx-dev-cae62d6fe1e33bda603c9a2926ab0fb8"
GT_PROJECT_ID="abcdef12-3456-789a-bcd4-ef123456789a"
```
Expand Down
2 changes: 0 additions & 2 deletions blog/en-US/i18n-without-translation-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ 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.
Expand Down
5 changes: 2 additions & 3 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 Expand Up @@ -80,7 +80,6 @@ It's one of the simplest and most impactful things you can do for accessibility

Without it, screen readers guess the language (often wrong), and search engines have less confidence in their language classification.

{/* useLocale works in both client and server rendered components, just not in async components */}
gt-next provides the `useLocale` hook that makes this trivial in your root layout:

```tsx title="app/[locale]/layout.tsx"
Expand Down
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
2 changes: 0 additions & 2 deletions devlog/en-US/gt-react_v10_15_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ 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.
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
2 changes: 0 additions & 2 deletions devlog/en-US/gt-react_v10_19_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ 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' />

## Overview
Expand Down
2 changes: 0 additions & 2 deletions devlog/en-US/react-core-linter_v0_1_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ 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' />

## Installation
Expand Down
1 change: 1 addition & 0 deletions docs/en-US/cli/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Use the CLI when you want to:
- Keep translations in version control alongside your source content.

## Quickstart [#quickstart]

Install `gt`, configure your project, and run your first translation. You need an existing project with a `package.json` and Node.js installed.

### 1. Install `gt`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

title: Managing translations
title: Managing translations
description: How to add or remove languages, keep Mintlify translations current, and edit generated translations with General Translation.
related:
links:
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, enqueue, check the status of, and download files for translation.

## Before you start [#before-start]

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

title: Quickstart
description: Learn what the `generaltranslation` Core library does, when to use it, and how to translate your first string.
description: Learn what the generaltranslation Core library does, when to use it, and how to translate your first string.
related:
links:
- /docs/platform/core/guides/translating-strings
Expand Down
4 changes: 2 additions & 2 deletions docs/en-US/platform/core/reference/gt-class/constructor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The constructor accepts a single optional [`GTConstructorParams`](/docs/platform
| [`sourceLocale`](#source-locale) | Default source locale for translations. | `string` | Yes | — |
| [`targetLocale`](#target-locale) | Default target locale for translations. | `string` | Yes | — |
| [`locales`](#locales) | Supported locale codes. | `string[]` | Yes | — |
| [`baseUrl`](#base-url) | Custom API base URL for enterprise deployments. | `string` | Yes | — |
| [`baseUrl`](#base-url) | Custom API base URL for Enterprise deployments. | `string` | Yes | — |
| [`customMapping`](#custom-mapping) | Custom locale code mappings and property overrides. | [`CustomMapping`](/docs/platform/core/reference/types/custom-mapping) | Yes | — |

### `apiKey` [#api-key]
Expand Down Expand Up @@ -92,7 +92,7 @@ Array of supported locale codes. Each code is standardized to its canonical form

**Type** `string` · **Optional**

Custom API base URL, used for enterprise deployments that point at a self-hosted or region-specific endpoint.
Custom API base URL, used for Enterprise deployments that point at a self-hosted or region-specific endpoint.

### `customMapping` [#custom-mapping]

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 Directive fields from a supported file.

## Set priority when groups overlap [#priority]

Expand Down
2 changes: 2 additions & 0 deletions docs/en-US/platform/dashboard/reference/project-settings.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---

title: "Project settings"
description: "Project settings control how an individual Project appears and how its translations are delivered."

---

Each Project in the Dashboard has its own settings, separate from Organization-wide settings. Use them to rename the Project, change its source locale, enable CDN delivery or AI Context, copy the Project ID, and delete the Project.
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/locadex/guides/auto-merging-prs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This is useful when your team reviews or edits generated translations in the Das

## Add validation commands [#add-validation-commands]

If Locadex should run a build, lint, or test command before creating the pull request, add a **post-process command**. (Pre-process commands run before Locadex processes files, post-process commands run after Locadex processes files).
If Locadex should run a build, lint, or test command before creating the pull request, add a **post-process command**. (Pre-process commands run before Locadex processes files; post-process commands run after Locadex processes files.)

For example:

Expand Down
4 changes: 2 additions & 2 deletions docs/en-US/platform/locadex/guides/configuring-workflows.mdx
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 All @@ -68,7 +68,7 @@ The text boxes at the bottom of the page provide additional customizability:
Use commands to run steps such as setup or validation on your Project. Use commands to install dependencies, build your Project, lint generated changes, or run Project-specific checks. Commands can be run before or after Locadex processes files:

- **Pre-process command** runs before Locadex processes files. For example, run `npm run build`.
- **Post-process command** runs after Locadex processes files. For example, run `npm run typecheck` .
- **Post-process command** runs after Locadex processes files. For example, run `npm run typecheck`.

Commands run from the repository root and inside the [Locadex VM image](/docs/platform/locadex/reference/vm-image). If a workflow fails because a package, script, or binary is missing, add a pre-process command.

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/locadex/guides/managing-languages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Choose or edit the language your source content is written in. Most English Proj

## Choose target languages [#choose-target-languages]

Choose the languages Locadex should translate into. You can select target languages from all 120 General Translation supported locales. Read more about locales at [Understanding locale codes](/docs/platform/core/guides/locale-codes) and [General Translation supported locales.](/docs/platform/dashboard/reference/supported-locales)
Choose the languages Locadex should translate into. You can select target languages from all 120 General Translation supported locales. Read more about locales at [Understanding locale codes](/docs/platform/core/guides/locale-codes) and [General Translation supported locales](/docs/platform/dashboard/reference/supported-locales).

## Save changes [#save-changes]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

title: extract_variables
description: Filter reserved GT keys from an options dict to get user variables in General Translation Python. API reference for extract_variables.
description: Filter reserved General Translation keys from an options dict to get user variables in General Translation Python. API reference for extract_variables.

---

Expand Down
1 change: 1 addition & 0 deletions docs/en-US/react/guides/configuring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ related:
- /docs/react/guides/translating-strings
- /docs/react/guides/managing-locales
- /docs/react/guides/storing-translations

---

Server-rendered React and each framework integration need configuration plus a `GTProvider` that exposes translations to your components. React SPAs initialize directly with `initializeGTSPA`; follow the [React SPA Quickstart](/docs/react/react-spa-quickstart) for that setup.
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/react/nextjs-pages-router-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ To see translations in development, you need API keys from General Translation.
Create a **`.env.local`** file:

```bash title=".env.local"
GT_API_KEY="your-api-key"
GT_DEV_API_KEY="your-dev-api-key"
GT_PROJECT_ID="your-project-id"
```

Expand Down
8 changes: 4 additions & 4 deletions docs/en-US/react/nextjs-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ To see translations in development, you need API keys from General Translation.
Create a **`.env.local`** file:

```bash title=".env.local"
GT_API_KEY="your-api-key"
GT_DEV_API_KEY="your-dev-api-key"
GT_PROJECT_ID="your-project-id"
```

Expand Down Expand Up @@ -335,12 +335,12 @@ That's it — your app is now multilingual. 🎉
This is expected. In development, translations happen on-demand (your content is translated in real time via the API). This delay **does not exist in production** — all translations are pre-generated by `npx gt translate`.
</Accordion>
<Accordion title="Some translations are inaccurate">
Ambiguous text can lead to inaccurate translations. For example, "apple" could mean the fruit or the company. Add a `context` prop to help:
Ambiguous text can lead to inaccurate translations. For example, "apple" could mean the fruit or the company. Add a `$context` prop to help:

```jsx
<T context="the technology company">Apple</T>
<T $context="the technology company">Apple</T>
```

Both `<T>`, `useGT()`, and `getGT()` support the `context` option.
`<T>`, `useGT()`, and `getGT()` all support the `$context` option.
</Accordion>
</Accordions>
2 changes: 1 addition & 1 deletion docs/en-US/react/reference/lint-rules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The General Translation React Core linter (`@generaltranslation/react-core-linte

| Rule | What it flags | Auto-fix |
| --- | --- | --- |
| [`static-string`](#static-string) | Dynamic or non-static strings passed to translation functions ([`useGT`](/docs/react/reference/hooks/use-gt), [`getGT`](/docs/node/reference/functions/get-gt), [`msg`](/docs/react/reference/functions/msg)), and non-static sugar variables. | Yes |
| [`static-string`](#static-string) | Dynamic or non-static strings passed to translation functions ([`useGT`](/docs/react/reference/hooks/use-gt), [`getGT`](/docs/react/nextjs/reference/functions/get-gt), [`msg`](/docs/react/reference/functions/msg)), and non-static sugar variables. | Yes |
| [`static-jsx`](#static-jsx) | Dynamic content inside [`<T>`](/docs/react/reference/components/t) that is not wrapped in a variable component. | Yes |
| [`no-data-attrs-on-branch`](#no-data-attrs) | `data-*` attributes on [`<Branch>`](/docs/react/reference/components/branch), which the component ignores. | No |

Expand Down
Loading