How often do you manually cross-check your project's language files before opening a pull request, just to make sure an international user doesn't see a raw technical key on the checkout button instead of a proper label? Usually, we edit the base dictionary, check the page in the browser, and merge the branch, hoping the bundler and tests catch anything else.
The catch is that the compiler is blind to translations: to it, a string identifier is just text, even if the corresponding entry is missing in another locale. How do you bring order to a web app's translations and prevent missing keys in your continuous integration (CI) pipeline? That's the problem solved by the open-source toolkit x18n (source code available at x18n-dev/x18n and featured in Best of JS)—a modular toolkit for internationalization (i18n, adapting an application for multiple languages).
Why Manual Locale Management Turns Dictionaries into a Junkyard of Forgotten Keys
Localization mechanics work a lot like a coat check with numbered tokens and paper ledgers. You don't write phrases directly in the code: instead, the developer drops a "token" with a slot address into the markup, such as t('settings.billing.card_expired'), and the app looks up the string by that number in the English, Russian, or German ledger.
In a Vue and Nuxt web project with 3 locales (en, ru, de) and 400 translation keys in JSON files, manual tracking breaks down fast. During a billing and profile refactoring, the team renames 12 string constants across components, updating only locales/en.json. As a result, 12 new keys go missing in ru.json and de.json (users see the bare settings.billing.card_expired path), 12 old strings sit as dead weight in the bundle, updated source phrases and {name} placeholders go stale in other languages, and hardcoded text slips into templates.
How x18n's Modular Core, Built-in Presets, and CLI Linter Catch Drift
You might ask: "Editors have had the i18n-ally plugin for years—why build a new tool?" I wondered the exact same thing while reading the docs. The original plugin's creator, Anthony Fu, built it around VS Code's internal API, so checks couldn't be moved to a terminal on a CI server or hooked up to other editors.
In x18n, the system is split into independent layers. The @x18n/core engine builds a dependency graph between your code and dictionaries, tracks source text staleness (stale detection), and ships with 45+ framework presets supporting JSON, YAML, PO, Fluent, and INI. It detects the locales/ directory automatically with zero configuration, while the @x18n/lsp language server and a browser panel run on top of the engine.
To catch those 12 missing constants in our Vue and Nuxt project with 3 locales and 400 keys, let's run the @x18n/cli console linter:
pnpx @x18n/cli check --strict --json
pnpx @x18n/cli usages common.buttons.submit
In our scenario, running pnpx @x18n/cli check --strict in the CI pipeline halts the build with exit code 1, blocking a broken payment form from deploying. The terminal prints the 12 missing keys in ru.json and de.json alongside the 12 obsolete strings ready for removal, while the --json flag outputs a line-numbered report for scripts and AI agents. Once the translations are added, the check returns exit code 0 (All i18n checks passed).
Auto-Detection Limits and Integration Overhead
Before integrating, keep the toolkit's boundaries in mind. The CLI requires Node.js 18.0.0 or higher (analysis runs locally without sending files over the network, though you still shouldn't store secrets in dictionaries). Rare enterprise formats will need a custom plugin for @x18n/core, and if you prefer keeping typed dictionaries inside component folders instead of shared JSON files, component-level internationalization in Intlayer is a better fit.
If you use custom wrappers instead of t(), auto-detection will miss those calls and flag the keys as "dead." To specify your own functions and exclude test files in a Vue and Nuxt project, add x18n.config.ts:
import { defineConfig } from '@x18n/core'
export default defineConfig({
sourceLocale: 'en',
resources: [{ pattern: 'locales/{locale}.json' }],
usage: {
include: ['src/**/*.vue', 'src/**/*.ts'],
exclude: ['**/*.spec.ts', '**/*.test.ts'],
calls: [{ callee: ['t', '$t', 'i18n.t'] }],
},
})
With this config and "lint:i18n": "x18n check --strict" in package.json, the scanner ignores *.spec.ts tests, recognizes i18n.t calls, and keeps all 400 keys across 3 locales protected in CI. If you ran pnpx @x18n/cli check in your own repo right now, how many forgotten keys and silent language mismatches would show up in your terminal?
