GT Next

Next.js internationalization library from General Translation that exposes a build-time <T> component for translating JSX trees, with helper components such as <Var>, <Plural>, and <Branch> for dynamic content. Source: npm registry gt-next, 2026-07-03

Routing Summary

Use GT Next when a Next.js app needs component-tree i18n over JSX, not only key/value string dictionaries. Review license, General Translation service dependency, Next.js/React peer compatibility, and build-time behavior before adopting it in a production app.

What it does

The useful idea in the bookmark is not only string lookup. The reviewed video thumbnail shows a code card where <T> wraps an entire JSX subtree:

<T>
  <h1>
    Hello, <Var>{user.name}</Var>!
  </h1>
  <p>Did you know we can translate an entire JSX?</p>
</T>

That matches the package type surface: T is documented as a build-time translation component, Var preserves runtime values, and the package also exports formatting and branching helpers such as Currency, DateTime, Num, RelativeTime, Plural, and Branch. Source: gt-next@6.16.37 package tarball, dist/index.types.d.ts, 2026-07-03

Version Snapshot

Checked 2026-07-03:

Source Snapshot
npm gt-next@6.16.37 on latest; odysseus dist-tag points to 11.0.0-odysseus.15.
GitHub generaltranslation/gt default branch and gt-next@6.16.37 peeled tag resolve to 46019049431c78d0348bba42c5b69189f097c135; repository showed 962 stars and 29 forks.
Package metadata License FSL-1.1-ALv2; peers `next >=13.0.0 <15.2.1

The moving odysseus channel and nonstandard license mean this should be treated as a candidate dependency until a project-specific license and service review is done.

Stack Fit

Use GT Next as a reference when a Next.js product needs full-component translation, not just string dictionaries. It is especially relevant for UI where translation can change word order and component arrangement. Do not adopt it by default for static marketing copy or small apps where plain dictionaries, message catalogs, or framework-native i18n are enough.

For Kevin's stack, the durable lesson is component-tree i18n as a design constraint: dynamic values, plural branches, and formatted values must be first-class translation nodes instead of ad hoc string interpolation.

CLI and non-Next routing boundary

General Translation's CLI also supports local JSON catalogs without GT Next. Configure the source locale, target BCP 47 locales, and JSON include pattern in gt.config.json; keep the API key in the process environment; and retain local catalogs when the runtime must work without a translation-network dependency. options.saveLocal lets reviewed local corrections synchronize back to GT. For a base JSON project, gt translate --dry-run is the appropriate offline parse/configuration gate; gt validate is registered for supported framework-inline workflows rather than arbitrary base JSON catalogs. Source: General Translation CLI configuration, translate, validate, and JSON-file docs, 2026-09-08

GT's framework routing guides also establish contracts that non-Next hosts must implement themselves:

  • URL locale has precedence over persisted and browser locale detection.
  • A language switch preserves the current route instead of returning home, and internal navigation remains inside the active locale prefix.
  • A short public alias such as /cn may map to the canonical zh-CN locale, but HTML lang, Open Graph locale, and hreflang stay canonical.
  • Unsupported locale prefixes should produce a true 404 instead of silently falling back, while canonical, alternate-language, and sitemap URLs enumerate the supported route graph.
  • User-authored and private values remain placeholders; they are interpolated after translation rather than sent as translatable source text.

In Next.js, GT's middleware and [locale] segment can own much of this surface. In vanilla Vite or another routerless host, GT owns catalog translation while the application owns these URL, navigation, crawl-time metadata, and error semantics explicitly. Source: General Translation locale alias/SEO, App Router middleware, localized navigation, locale detection, and locale-code docs, 2026-09-08


Timeline