Configuration
Base dictionary (extends)
The extends field in i18n-kit.config.json lets a project inherit translations from a shared base — for example, a corporate terminology dictionary maintained centrally in a monorepo or npm package.
// i18n-kit.config.json
{
"extends": "../../shared-i18n"
}When the editor reads a locale, base keys are merged underneath project keys — the project always wins. Base-only keys appear in the editor but are not written to project locale files on save.
Typical structure:
monorepo/
├── shared-i18n/
│ ├── en.json ← base dictionary (company-wide terms)
│ └── ru.json
└── my-app/
├── i18n-kit.config.json ← "extends": "../shared-i18n"
└── src/locales/
├── en.json ← app-specific overrides
└── ru.jsonLocked keys
The locked field in the base config declares keys that child projects cannot modify.
// shared-i18n/i18n-kit.config.json
{
"localesDir": "locales",
"locked": ["brand.name", "brand.tagline", "legal.*"],
}| Layer | Behaviour |
|---|---|
| Editor UI | Cell is greyed out with a lock icon; tooltip "Key locked by base dictionary" |
PUT /api/locale/:code | Server returns 403 if a locked key value changes |
merge --overwrite | Locked keys are skipped even with --overwrite |
prune | Locked keys are never removed |
Locked key patterns support globs: "legal.*" (all keys under legal), "brand.name" (exact), "**" (everything).
Validation rules (rules)
The rules section in i18n-kit.config.json configures the locale editor's validation behaviour. All fields are optional.
// i18n-kit.config.json
{
"rules": {
"interpolationPatterns": ["{var}", "{{var}}"],
"lengthWarningFactor": 3,
"warnOnHtmlTags": true,
"warnOnIcuErrors": true,
"warnOnDuplicateValues": true,
"minValueLength": 0,
},
}| Field | Default | Description |
|---|---|---|
interpolationPatterns | ["{var}"] | What counts as an interpolation variable. Also supports "{{var}}", ":param", "%(var)s". |
lengthWarningFactor | 2.5 | Warn if value.length > ref.length × factor. Set to 0 to disable. |
warnOnHtmlTags | true | Warn when values contain HTML tags. |
warnOnIcuErrors | true | Warn on malformed ICU (unclosed braces, missing other{}). |
warnOnDuplicateValues | true | Warn if a key has identical values across all locales. |
minValueLength | 0 | Warn if value is shorter than this many characters (0 = off). |
The same rules object can be passed to vueI18nCheckPlugin.
Ignore lists (ignore)
The ignore section lets you whitelist keys and paths that would otherwise trigger warnings or be removed by CLI tools.
// i18n-kit.config.json
{
"ignore": {
"prune": ["status.*", "dynamic.*"],
"duplicates": ["brand.name", "app.version"],
"unused": ["seo.*", "meta.*"],
"scanExclude": ["src/tests/**", "scripts/**"],
},
}All patterns support glob syntax: * matches any single segment, ** matches any number of path segments.
ignore.prune patterns are also respected by the prune --dry preview.