Skip to content
Draft
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
4 changes: 2 additions & 2 deletions DOCS-SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,9 @@ Beyond the two maps above, the docs follow these agent best practices so an agen

Document these entry points for developers on the **Overview → For coding agents** page (see For coding agents page).

### AGENTS.md (for product users' agents)
### Drop-in AGENTS.md guide

Publish a root `AGENTS.md` aimed at the **coding agents of developers who use General Translation** — *not* at agents editing this docs repo. A developer drops it (or its contents) into their own project so their agent knows how to add and run General Translation correctly. Keep it self-contained, imperative, and short enough to fit an agent's context window.
Embed a copyable `AGENTS.md` guide on the **For coding agents** page, aimed at the **coding agents of developers who use General Translation** — *not* at agents editing this docs repo. A developer drops its contents into their own project so their agent knows how to add and run General Translation correctly. Keep it self-contained, imperative, and short enough to fit an agent's context window.

Structure it in this order:

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 @@ -91,7 +91,7 @@ export default withGTConfig(nextConfig, {

I could've added more locales, but I just wanted to test the chatbot with a few different languages. Feel free to add as many locales as you want!

[Here's a list of all of the ones supported by gt-next](https://generaltranslation.com/docs/platform/supported-locales).
[Here's a list of all of the ones supported by gt-next](https://generaltranslation.com/docs/platform/dashboard/reference/supported-locales).

### How it works

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/quickstart) 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/cli/reference/commands/init) 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#11-deploy-to-production)

**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/quickstart) 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/i18n-without-translation-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,6 @@ But most developers are already thinking in one language when they build UI. The
npx gt@latest init
```

The setup wizard configures your project, installs dependencies, and sets up translation hot reloading for development. Full walkthrough in the [quickstart guide](https://generaltranslation.com/docs/react).
The setup wizard configures your project, installs dependencies, and sets up translation hot reloading for development. Full walkthrough in the [quickstart guide](https://generaltranslation.com/docs/react/react-quickstart).

`gt-react` is open source. For Next.js App Router, there's [`gt-next`](https://generaltranslation.com/docs/react/nextjs). For React Native, there's [`gt-react-native`](https://generaltranslation.com/docs/react/react-native).
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 @@ -311,7 +311,7 @@ Here's a quick summary of everything covered:

## Next steps

- [gt-next quickstart](https://generaltranslation.com/docs/react/nextjs) to set up the full i18n stack
- [gt-next quickstart](https://generaltranslation.com/docs/react/nextjs-quickstart) to set up the full i18n stack
- [Middleware guide](/docs/react/nextjs/app-router-middleware) for routing configuration
- [SSG guide](/docs/react/nextjs) for statically generating multilingual pages
- [SSG guide](/docs/react/nextjs/app-router-static-site-generation) for statically generating multilingual pages
- [RTL support](/docs/react/guides/managing-locales) for right-to-left languages
12 changes: 6 additions & 6 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 @@ -38,13 +38,13 @@ No keys. No JSON files. No cross-referencing. The source of truth is your code.

## Setup

The syntax above comes from [gt-next](https://generaltranslation.com/docs/react/nextjs), an open-source i18n library for Next.js App Router. Getting started takes one command:
The syntax above comes from [gt-next](https://generaltranslation.com/docs/react/nextjs-quickstart), an open-source i18n library for Next.js App Router. Getting started takes one command:

```bash copy
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
- [Bring your own translations](https://generaltranslation.com/docs/react/guides/translating-with-dictionaries) — use `gt-next` with an existing dictionary
4 changes: 2 additions & 2 deletions blog/en-US/plurals.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ function Example({ count }) {

Ready to handle plurals properly in your React app? Check out our quickstart guides:

- [gt-react quickstart](https://generaltranslation.com/docs/react) for React apps
- [gt-next quickstart](https://generaltranslation.com/docs/react/nextjs) for Next.js apps
- [gt-react quickstart](https://generaltranslation.com/docs/react/react-quickstart) for React apps
- [gt-next quickstart](https://generaltranslation.com/docs/react/nextjs-quickstart) for Next.js apps
- [`<Plural>` API reference](/docs/react/reference/components/plural) for the full component API

Pluralization is one of the most common i18n challenges in React — getting it right from the start saves significant refactoring later.
20 changes: 18 additions & 2 deletions docs/en-US/cli/guides/using-auto-jsx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Automatic JSX injection makes the compiler wrap translatable JSX text in [`<T>`]

Automatic JSX injection is disabled by default.

*Note: Automatic JSX injection currently works only with the i18n-context system and single-page React apps.*
*Note: Automatic JSX injection works with React single-page apps and Next.js webpack builds. The `gt-next` SWC compiler and Turbopack do not support it.*

## Enable automatic JSX injection [#enable]

Expand All @@ -33,12 +33,28 @@ Set `enableAutoJsxInjection` under `files.gt.parsingFlags` in `gt.config.json`.
}
```

React SPA build plugins read this flag directly. In Next.js, also enable the Babel-based compiler in `next.config`:

```ts title="next.config.ts"
import { withGTConfig } from 'gt-next/config';

const nextConfig = {};

export default withGTConfig(nextConfig, {
experimentalCompilerOptions: {
type: 'babel',
},
});
```

Build the Next.js app with webpack, for example with `next build --webpack`. When you build with Turbopack, `gt-next` warns and skips automatic JSX injection.

## How it works [#how]

Without injection, you wrap translatable text yourself.

```jsx
import { T } from 'gt-next';
import { T } from 'gt-react';

function Welcome() {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---

title: Configuring Google Drive
description: "How to connect Google Drive to General Translation: this guide covers personal accounts, Organization shared drives, and file access."
related:
links:
- /docs/integrations/google-drive/guides/translating-content
- /docs/integrations/google-drive/guides/managing-translations

---

Connect a Google account or an Organization shared-drive connection before adding files to a Project. The access mode controls which files users can browse and which identity creates translated copies.

## Before you start [#before-start]

Connecting Google Drive requires:

- `project:write` permission to connect the integration.
- `translations:content:write` permission to add, remove, or translate files.
- A plan that includes Project integrations.
- Permission in Drive to copy each source file and edit its translated copies.

## Choose an access mode [#access-mode]

When an Organization shared-drive connection is available, the Dashboard asks how the Project should access Drive.

- **Organization shared drive:** everyone on the Project uses one translation account. An Organization admin sets up the connection under **Organization > Settings > Integrations**, adds the translation account to each shared drive as a **Content manager**, and verifies access.
- **Personal Google account:** each user connects their own Google account. Users browse only files their account can access, and General Translation requests file-specific access for the files they select.

If no Organization connection is available, the Project uses personal accounts.

## Connect the Project [#connect-project]

1. Open **Project > Integrations** in the Dashboard.
2. Open the catalog and find **Google Drive**.
3. Click **Connect**.
4. Choose an access mode when prompted.

The catalog shows **Installed** after the integration is connected. Click **Manage** to add files, translate them, or reconnect an account.

## Connect or reconnect a personal account [#personal-account]

On the management page, click **Connect account** and complete the Google authorization flow. When you click **Add files**, choose Google Docs or Google Slides in the Google Picker.

If the picker cannot show your files, reload and allow Google's cookie prompt. In Safari, you may need to turn off **Prevent cross-site tracking** temporarily, then reload and try again.

Disconnecting removes your stored Google credentials. It does not delete the Project's linked files, but they remain hidden and cannot be translated until you reconnect. Other Project members keep access through their own accounts.

## Manage linked files [#linked-files]

Click **Add files** whenever you need to link more content. Removing a file from the integration only removes the Project link; it does not delete the source file or translated copies from Google Drive.

For an Organization connection, add the translation account to another shared drive and verify access from **Organization > Settings > Integrations** before browsing files from that drive.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---

title: Managing translations
description: "How to keep Google Drive translations current with General Translation: this guide covers applying source changes, reusing translations, and forcing retranslation."
related:
links:
- /docs/integrations/google-drive/guides/configuring-google-drive
- /docs/integrations/google-drive/guides/translating-content

---

After the first run, use the Google Drive integration to apply source changes to the existing translated copies. General Translation reuses translations when it can and updates each target copy in place.

## Apply source changes [#apply-changes]

When a linked Google Doc or Google Slides presentation changes:

1. Open **Project > Integrations > Google Drive**.
2. Select the changed files.
3. Choose the target locales under **Translate into**.
4. Click **Apply changes**.

General Translation reads the latest source and the existing target copy. It reuses matching translations, translates new or changed text, and updates text that still has a matching location in that copy.

## Reuse existing translations [#reuse]

Every normal run imports translations from the existing target copy and reuses matching content. This preserves reviewed edits and avoids translating unchanged text again.

If a source file has changed across several saved versions, General Translation can also reuse matching translations from older ancestor versions. No additional setup is required.

## Force a full retranslation [#force]

Use **Force retranslation** when you intentionally want to ignore reused and cached translations.

1. Select at least one file that already has a translated copy.
2. Check **Force retranslation**.
3. Click **Retranslate**.
4. Confirm the warning.

Force retranslation starts from the source again, overwrites existing translations in the target copy, and incurs additional usage. The warning opens when you click **Retranslate**, not when you select the checkbox. You can suppress it until the next full-page reload.

## Remove or reconnect files [#remove-reconnect]

Removing a linked file does not delete the source file or its translated copies from Drive.

If a personal Google account is disconnected, its linked files are hidden until that user reconnects. With an Organization connection, an Organization admin must restore or verify the shared-drive connection before the Project can browse or translate its files.
9 changes: 9 additions & 0 deletions docs/en-US/integrations/google-drive/guides/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"title": "guides",
"description": "Connect Drive, translate files, and keep translated copies current.",
"pages": [
"./configuring-google-drive",
"./translating-content",
"./managing-translations"
]
}
Loading
Loading