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
12 changes: 6 additions & 6 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
```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
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
2 changes: 1 addition & 1 deletion devlog/en-US/gt-next_v6_10_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default async function Home() {

### The `locale` parameter requirement

Cached components use their parameters as cache keys, any cached component that contains translatable content must accept a `locale` parameter if they are to update when a user's locale changes. For example, `CachedContent` must accept a `locale` parameter to create separate cache entries for each locale. Without this parameter, the component would serve the same cached content regardless of the user's locale.
Cached components use their parameters as cache keys, so any cached component that contains translatable content must accept a `locale` parameter if they are to update when a user's locale changes. For example, `CachedContent` must accept a `locale` parameter to create separate cache entries for each locale. Without this parameter, the component would serve the same cached content regardless of the user's locale.

### Configuration notes

Expand Down
4 changes: 2 additions & 2 deletions devlog/en-US/gt-next_v6_2_0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export default function Page() {
We deliberately kept `gt()` synchronous to match other i18n libraries.
The downside was a `two-step translation process`:

1. Register the text with the API.
2. Wait for a second render to display the translated result.
1. Register the text with the API.
2. Wait for a second render to display the translated result.

Now, thanks to the compiler, translatable content is scanned ahead of time and passed directly into `useGT()` or `getGT()` at compile time.
This means translations are immediately available at runtime — no page refreshes.
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This means:
- Your existing story structure and slugs are unchanged.
- Writes are drafts, so translations are visible in Storyblok's editor once you switch languages, and go live only when you publish the story.

*Note: General Translation stores the localized value on a per-field, per-language key derived from the field name and the target language. Confirm the exact key format against the serialization code before relying on it directly; when reading through Storyblok's delivery API you do not need to know it.*
*Note: General Translation stores the localized value on a per-field, per-language key derived from the field name and the target language; when reading through Storyblok's delivery API you do not need to know it.*

## Fetch translated content [#fetch-content]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: Format ICU-style messages without a GT instance. API reference for

Import `formatMessage` directly from `generaltranslation` and call it with a message string and an options object. It does not require an API key or a [GT](/docs/platform/core/reference/gt-class/constructor) instance. For instance-based formatting that inherits the instance locale, use the [`formatMessage`](/docs/platform/core/reference/gt-class-methods/formatting/format-message) method on a [`GT`](/docs/platform/core/reference/gt-class/constructor) instance instead.

It is built on top of Format.JS's [`intl-messageformat`](https://formatjs.github.io/docs/intl-messageformat/) library, so it also supports number formatting, date formatting, plurals, and selects.
It is built on top of FormatJS's [`intl-messageformat`](https://formatjs.github.io/docs/intl-messageformat/) library, so it also supports number formatting, date formatting, plurals, and selects.

```typescript
import { formatMessage } from 'generaltranslation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ General Translation supports three annotation **types**: labels, notes, and comm
| Annotation Type | Best For | Usage |
| ----------------------------------------------------- | -------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| **Labels** are colored tags for categorizing entries. | **Review states** like "Needs review," "Approved," or "Legal." | Create Project-wide labels, toggle them on entries, manage them in bulk, and filter by label. |
| **Note** is a plain-text note attached to an entry. | Translator guidance and **internal context**. | Add a singular note per entry and locale. |
| **Notes** are plain-text notes attached to an entry. | Translator guidance and **internal context**. | Add a singular note per entry and locale. |
| **Comments** are threaded discussions. | **Team conversations** with replies, resolve, and reopen. | Start a thread, reply, resolve it when complete, and reopen if needed. |


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: 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 @@ -47,7 +47,7 @@ Translation is charged per token of input at a base rate set by file format and
- **Context** — providing extra context to guide translation adds **$0.2 per 1,000 context tokens**, set per Project.
- **Locadex** — agent runs are priced separately, metered in **Locadex Compute Units (LCUs)** at **$5 per LCU**. An LCU measures the resources an agent uses to run end to end.

*Example: translating 1,000 tokens of Markdown with 3,000 tokens of context costs $1.06.*
*Example: translating 1,000 tokens of Markdown with 3,000 tokens of context costs $1.60.*

See the [usage rates](https://generaltranslation.com/pricing/usage) page for more information.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Project settings control how an individual Project appears and how its translati
- Update the Project **display name**. This changes how the Project appears in the Dashboard.
- Update the Project **source locale**. This changes the language your content is authored in, but does not update existing translations.
- Enable the **CDN setting** to serve translations from a global CDN for faster load times.
- Enable **AI Context**, which uses contextual information to improve AI translation quality
- Enable **AI Context**, which uses contextual information to improve AI translation quality.

## Project ID [#project-id]

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/platform/openapi/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Use the correct key type:

- **Project (development)** with prefix `gtx-dev-`: for local and preview use, rejected by production-only endpoints
- **Project (production)** with prefix `gtx-api-`: bound to one Project
- **Organization** with prefix `gtx-org-`: works across Projects. When using an Organization key on Project-scoped endpoints, must send `x-gt-project-id`.
- **Organization** with prefix `gtx-org-`: works across Projects. When using an Organization key on Project-scoped endpoints, you must send `x-gt-project-id`.

See [API keys](/docs/platform/dashboard/reference/api-keys) for how to create and scope API keys.

Expand Down
Loading