i18n Key Manager
A VS Code / Cursor extension to manage translation keys across all your locale files without ever editing JSON manually. Create, edit, rename, delete, and audit translation keys from a single interface.
Features
- Create and edit translation keys across all languages from a webview panel
- Delete keys from all locale files at once
- Rename keys across locale files and update all references in source code automatically
- Find missing translations — detect keys that exist in some locales but not others
- Find unused keys — scan your source code and report keys that are never referenced
- Autocomplete — get IntelliSense suggestions for translation keys inside
t(), $t(), translate(), instant(), and more
- Hover preview — hover over a translation key to see all translations in a table
- Diagnostics — warnings in the Problems tab for missing or invalid translation keys
- Quick key selection from existing translations via searchable picker
- Add new languages dynamically — the extension creates the JSON file automatically
- Text selection support — highlight text in the editor and activate the command to pre-fill the key name
- Sorted output — keys are saved alphabetically in every locale file
Commands
| Command |
Title |
i18n.manage |
i18n: Manage Translation Key |
i18n.deleteKey |
i18n: Delete Translation Key |
i18n.renameKey |
i18n: Rename Translation Key |
i18n.findMissing |
i18n: Find Missing Translations |
i18n.findUnused |
i18n: Find Unused Keys |
Configuration
| Setting |
Type |
Default |
Description |
i18nManager.localesPath |
string |
"src/locales" |
Relative path to the locales directory from the workspace root |
i18nManager.translationPatterns |
string[] |
[] |
Additional regex patterns for detecting translation function calls (capture group 1 must be the key) |
i18nManager.sourceGlobs |
string[] |
["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.vue", "**/*.html", "**/*.svelte"] |
File glob patterns to include when scanning for translation key references |
i18nManager.excludeGlobs |
string[] |
["**/node_modules/**", "**/dist/**", "**/out/**", "**/build/**"] |
File glob patterns to exclude when scanning for translation key references |
i18nManager.primaryLocale |
string |
"en" |
Primary locale used as reference for missing key detection and autocomplete preview |
Example (settings.json):
{
"i18nManager.localesPath": "src/i18n/locales",
"i18nManager.primaryLocale": "es",
"i18nManager.translationPatterns": [
"myCustomT\\(\\s*['\"](https://github.com/OschubGit/i18n-manager/blob/HEAD/[^'\"]+)['\"]\\s*\\)"
]
}
Supported Patterns
The extension detects translation keys in the following function calls and patterns out of the box:
t('KEY') / t("KEY")
$t('KEY') / $t("KEY")
i18n.t('KEY') / i18n.t("KEY")
translate('KEY') / translate("KEY")
instant('KEY') / instant("KEY")
'KEY' | translate / "KEY" | translate (Angular pipe)
<Trans i18nKey="KEY" /> (React)
You can add custom patterns via the i18nManager.translationPatterns setting.
Keyboard Shortcuts
| Platform |
Shortcut |
Command |
| Windows / Linux |
Ctrl+Shift+I |
Manage Translation Key |
| Mac |
Cmd+Shift+I |
Manage Translation Key |
The manage, rename, and delete commands are also available from the editor context menu (right-click).
Files are flat JSON objects stored as {lang-code}.json inside the configured locales directory.
{
"HOME_TITLE": "Home",
"HOME_DESCRIPTION": "Welcome to the app"
}
Requirements
- VS Code
^1.85.0 or Cursor
Installation
From the Marketplace
- Open the Extensions panel (
Ctrl+Shift+X / Cmd+Shift+X)
- Search for i18n Key Manager
- Click Install
From VSIX
- Download the
.vsix file
- Run
Extensions: Install from VSIX... from the Command Palette
- Select the downloaded file
License
MIT — see LICENSE