⚠️ This is a fork of lokalise/i18n-ally.
- Extends the original extension with additional controls over which problems are displayed in the editor, giving you finer-grained configuration to suppress or highlight specific i18n diagnostics based on your project's needs.
- Adds support for the
withPrefix pattern, which allows you to define a translation key prefix once and reuse it with suffix keys. The extension will automatically resolve the full key for annotations, hover, and diagnostics.
- Adds the
i18n-ally.ignoreMissingKeys setting, which silently ignores any detected keys that do not exist in your locale files — useful when your regex patterns intentionally match dynamic or partially-constructed keys.
- Adds the
i18n-ally.contextMenu.disabled setting, which prevents i18n Ally from adding any items to the editor context menu.
- Adds the
i18n-ally.usage.detectKeyLiterals setting, which treats plain string literals that match an existing key as key usages, so keys stored in variables, props or maps are still found.
- Go to Definition and Find All References work in both directions: from code to the locale file, and from a key in a locale file to its usages in code.
- Faster usage scanning and editor feedback in large workspaces.
⚙️ Additional Configuration
Type: boolean | Default: false
When enabled, i18n Ally will not add any items to the editor context menu.
{
"i18n-ally.contextMenu.disabled": true
}
i18n-ally.ignoreMissingKeys
Type: boolean | Default: false
When enabled, any translation keys detected in your code that do not exist in your locale files will be silently ignored. They will not appear in inline annotations, hover tooltips, or the problems panel.
This is useful when your usageMatchRegex patterns are broad and may match dynamic keys or partially-constructed strings that are not expected to resolve to a valid locale entry.
{
"i18n-ally.ignoreMissingKeys": true
}
i18n-ally.usage.detectKeyLiterals
Type: boolean | Default: true
When enabled, quoted strings that exactly match an existing key are treated as key usages, even when they are not passed to a translation function. They get annotations and hover, count in the usage report, and work with Go to Definition and Find All References.
const bannerText: TranslationKey = autoClaimEnabled
? "pages.wallet.alert_auto_claim_on" // detected
: "pages.wallet.alert_auto_claim_off"; // detected
Only keys that contain a . and already exist in your locale files are matched, so ordinary strings are not affected. Keys built dynamically (e.g. `pages.${name}`) are still not detected; use i18n-ally.keysInUse or i18n-ally.usage.derivedKeyRules for those.
{
"i18n-ally.usage.detectKeyLiterals": false
}
🧭 Navigation
- From code: Go to Definition (F12 or Cmd/Ctrl+click) on a key opens its entry in the locale file for your display language. Find All References (Shift+F12) lists every usage across the workspace.
- From a locale file: Go to Definition on a key opens a peek list of its usages in code. Find All References shows the same usages, plus the key itself.
- Keys are resolved the same way as for annotations, including
withPrefix calls, regex.usageMatchAppend patterns, key literals and namespaces.
The first usage lookup scans the workspace, with a status bar message while it runs. Later lookups use a cache that is updated when you save a file. To exclude folders from the scan, use i18n-ally.usage.scanningIgnore. If files change outside the editor (for example after switching branches), run i18n Ally: Refresh usage report.
withPrefix
/**
* Creates a helper that combines a translation key prefix with a suffix key,
* returning a fully typed literal string.
*
* Autocomplete for `key` is limited to the valid suffixes for the provided
* `prefix`.
*
* @example
* const prefix = withPrefix(
* "pages.travel.steps.preferences.sections.car_service",
* );
* const key = prefix("banner"); // "pages.travel.steps.preferences.sections.car_service.banner"
*/
export const withPrefix =
<TPrefix extends TranslationKeyPrefix>(prefix: TPrefix) =>
<TKey extends TranslationKeySuffix<TPrefix>>(
key: TKey,
): `${TPrefix}.${TKey}` => {
return `${prefix}.${key}` as `${TPrefix}.${TKey}`;
};
v2.0 is released with new Editor UI and Review System 🎉
Migrate from v1.x
Maintained by

Lokalise is the fastest growing language cloud technology made by developers, for developers.
As a collaborative productivity platform, it helps structure and automate the translation and localization process for any company in the world.
Learn more
Demo
Inline Annotations

Hover and Direct Actions

Manage All Translations in One Place


Extract Translations from Code

Report Missing Translations

Machine Translation

Annotations for JSON and YAML

General Features
- Supports multi-root workspaces
- Supports remote development
- Supports numerous popular frameworks
- Supports linked locale messages
- Uses i18n for the extension itself, of course. Translation List
🌍 Multilingual Support
This extension itself supports i18n as well. It will be auto-matched to the display language you use in your VS Code editor. We currently support the following languages.
Help Translate
👨💻 If you would like to help a language's translation up to date, feel free to put your name in the Maintainers field. I will @mention you when needed. Much appreciated.
❤️ Thanks
This extension was inspired by think2011/vscode-vue-i18n, it wouldn't exist without @think2011's great work.
Support for Vue Single File Component (SFC) is powered by kazupon/vue-i18n-locale-message, which is created by the author of vue-i18n. Thanks for making this!
Code Contributors
My great thanks to all the awesome contributors:

📄 License
MIT License © 2021-PRESENT Lokalise
MIT License © 2019-2020 Anthony Fu
MIT License © 2018-2019 think2011