Knowledge Base updated: 2026-11-22
General Translation knowledge base
Orientation
General Translation is a localization platform monorepo. Its packages provide shared locale and translation runtime primitives, message formatting, source extraction and compilation, framework integrations, operational CLIs, API clients, CMS plugins, and analysis tools.
Runtime state is centered on project and locale configuration, request or provider context, translation caches and condition stores, and generated localization artifacts. Build-time state flows from source discovery through compiler and extractor passes into catalogs, generated code, and framework-specific outputs.
The primary boundaries are the shared localization runtime, application-framework adapters, the extraction/compilation toolchain, and translation operations tooling. Follow the linked pages below for package-level ownership and implementation detail.
flowchart LR
App[Application source] --> Compiler[Compiler transforms]
App --> Extractors[Language/framework extractors]
Compiler --> Artifacts[Localization artifacts]
Extractors --> Artifacts
CLI[Primary CLI] --> Compiler
CLI --> Git[Filesystem and Git workflows]
Artifacts --> Runtime[Localization runtime]
Runtime --> Format[Message formatting]
Runtime --> React[React integration]
Runtime --> Next[Next.js integration]
Runtime --> Other[Vue / React Native / TanStack]
CLI --> API[Translation API client]
API --> Service[Translation service]
Service --> CMS[Sanity / Payload plugins]
Service --> Tools[GTX / Locadex / recording / analysis]
Glossary
- Localization artifact: generated or extracted output used to resolve localized application content.
- Condition store: runtime state used to select conditional translation variants.
- Paraglide JS: the repository’s compiler and CLI path for catalog discovery, source analysis, generated outputs, and bundler-facing virtual modules.
- GTX: a developer-facing CLI workflow for localization operations and framework helpers.
- Locadex: a localization-focused operational CLI and utility layer.
Invariants
- Locale selection and propagation must use the shared configuration and context helpers rather than framework-local duplicate state; see
packages/core/**,packages/i18n/**, andpackages/node/**. - Framework adapters must preserve the runtime’s provider/request boundary when exposing translation APIs; see
packages/react/**,packages/next/**, and framework adapter packages. - Extraction and compilation outputs must remain derived from source analysis and configured compiler passes, not hand-maintained generated artifacts; see compiler and extractor package source trees.
- CLI workflows that persist local translation edits must account for repository and lockfile state; see packages/…/collectUserEditDiffs.ts, packages/…/saveLocalEdits.ts, and packages/…/base.ts.
- Translation-service integrations must keep transport/authentication concerns behind the API client boundary; see translation API client package sources.
Routing table
packages/core/**,packages/i18n/**,packages/node/**-> docs/localization-runtime.mdpackages/core/**/translation/**,packages/i18n/**/translation/**,packages/node/**/translation/**-> docs/translation-runtime.mdpackages/core/**/config/**,packages/i18n/**/locale/**,packages/node/**/cookies/**-> docs/localization-configuration.mdpackages/format/**-> docs/message-formatting.mdpackages/react/**,packages/next/**,packages/vue/**,packages/react-native/**,packages/tanstack-start/**-> docs/application-framework-integrations.mdpackages/react/**,packages/react-core/**-> docs/react-integration.mdpackages/next/**-> docs/nextjs-integration.mdpackages/vue/**,packages/react-native/**,packages/tanstack-start/**-> docs/alternative-framework-integrations.mdpackages/compiler/**,packages/cli/**,packages/extractors/**,packages/paraglide-js/**-> docs/extraction-and-compilation.mdpackages/cli/**-> docs/cli-orchestration.mdpackages/compiler/**-> docs/compiler-transform-pipeline.mdpackages/extractors/**,packages/react-core/**/eslint/**-> docs/language-and-framework-extractors.mdpackages/paraglide-js/**-> docs/paraglide-js-compilation.mdpackages/api-client/**,packages/gtx/**,packages/locadex/**,packages/sanity/**,packages/payload/**,packages/rrweb/**,packages/bundle-analysis/**-> docs/translation-operations.mdpackages/api-client/**-> docs/translation-api-client.mdpackages/gtx/**-> docs/gtx-command-line-workflows.mdpackages/locadex/**-> docs/locadex-operations.mdpackages/sanity/**-> docs/sanity-cms-integration.mdpackages/payload/**-> docs/payload-cms-integration.mdpackages/rrweb/**-> docs/session-recording-localization.mdpackages/bundle-analysis/**-> docs/bundle-analysis.md