Repository navigation
Dev Tools
📄 Mirrors
docs/dev-tools.mdin the main repo — the repo version is canonical.
Status: planned / pre-release. This page documents the intended API of next-tongue. Nothing is published yet; names may change before v1.0. See ROADMAP.
All three tools are built in, with zero dependencies (ADR 0012).
In next dev, TongueProvider renders a small panel (toggle with Alt+Shift+T) that shows:
- the current locale and time zone;
- missing keys rendered on the page (keys that fell back to another locale, or are absent);
-
which messages went to the client on this route: per-key modules loaded, and namespaces included because
tescaped a file (TONGUE_W_ESCAPE); -
click-to-key: with the panel open, click any translated string to see its key and open its source location (
messages/de.json:12) via your editor URL (devOverlay: { editor: 'vscode' }, orTONGUE_EDITOR).
In dev, compiled messages carry key ids that the overlay maps back to strings. The overlay is gated by process.env.NODE_ENV === 'development' and is stripped from production builds: no overlay code and no key ids in production output (tested in CI). Disable it with devOverlay: false.
// tongue.config.ts
export default defineConfig({ locales: ['en', 'de'], defaultLocale: 'en', pseudo: true });- Adds an
en-XApseudo-locale generated from the default locale at codegen time. Visit/en-XA/...in dev. - Strings are accented (
Settings→[Šéţţîñĝš ···]) and expanded byexpand(default 35%) to reveal truncation, hard-coded strings and concatenation. - ICU structure is preserved: arguments, plural/select branches and tags are never altered, only literal text.
-
enabled: 'dev'(default) excludes the pseudo-locale from production builds;'always'keeps it (e.g. for a staging QA build). It is never offered by locale detection.
npx next build && npx tongue reportPrints, for each route, the number of keys and the bytes (min + gzip) of message code sent to the client, plus namespaces pulled in by escapes or t.ns. --json for CI; --max-bytes 4kb fails when a route exceeds a budget. It reads the client chunks that next build wrote and matches next-tongue's per-key module markers; it does not depend on Next internals or manifests.
Guides
- Getting Started
- Configuration
- Routing and Proxy
- Server Components
- Client Components
- Server Actions
- ICU Messages
- Type Safety
- Cache Components and PPR
- Static Export
- Metadata SEO and hreflang
- Database and CMS Messages
- Dev Tools
- Translator Workflow
- Per-user Preferred Language
- CLI
- AI Translation
- Testing
- VS Code Extension
- Migration from next intl
- Migration from next international (deferred)
Reference