Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>EH i18nNew to Visual Studio Code? Get it now.
EH i18n

EH i18n

Crunchy Crackers

|
196 installs
| (4) | Free
Extension facilitating the creation of locale keys
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

EH i18n - VS Code Create Locale Key

A VS Code extension for creating a new key in a JSON locale file and replacing selected text with a reference to that key. Also supports showing translation on hover, jumping to translation definitions, and locale key autocomplete suggestions.

Features

  • Creates a new key in a JSON locale file and replaces selected text with a reference to that key
  • Supports showing translation on hover, jumping to translation definitions, and locale key autocomplete suggestions.
  • Supports custom locale file path
  • Suggest existing keys whose value is the selected text
  • Sort the json file

Usage

Translation Hover, Jump to Definition and Autocomplete Suggestions

intellisense

Creation

Place the mouse cursor on the string and click to Light bulb icon or Cmd + . to see code actions

createNewKey

Using command (Legacy)(Ctrl + Shift + P or Cmd + Shift + P and search for EH i18n - Create Locale Key)

edit

NOTE: For nested keys, separate the keys with -- (e.g. parent--child--grandchild) nested

NOTE: If the the text exists, suggest existing keys whose value is the selected text existingKeySelect

For editing message of an existing key.

Place the mouse cursor on the string and click to Light bulb icon or Cmd + . to see code actions

editKey

Using command (Legacy)(Ctrl + Shift + P or Cmd + Shift + P and search for EH i18n - Edit Locale Message)

happy_case

Configuration

The extension can be configured with the following settings:

  • createLocaleKey.localeFilePath: The file path to the JSON locale file (default: src/packages/eh-locale/lang/en-AU.json)
  • createLocaleKey.withBrackets: Whether to format the replacement reference with brackets (default: false)
  • createLocaleKey.sort: Whether to sort the keys in alphabetical order (default: false).

NOTE: Sorting criteria:

  1. Sort the keys alphabetically.
  2. Sort the keys with dots after keys without dots.
  3. Sort keys whose values are objects after those whose values are strings
image

If createLocaleKey.sort is checked:

ezgif com-video-to-gif (2)

Known Issues

  • None at the moment.

Release Notes

0.1.7

  • Support showing translation on hover, jumping to translation definitions, and locale key autocomplete suggestions.
  • Use esbuild for bundling.
  • Update default locale fallback path to work with eh-mobile-pro repo by default.

0.1.1

Support code action providers and add key to more correct position

0.1.0

Add edit message

0.0.9

Add sort and suggestion of existing keys

0.0.6

Initial release of Create Locale Key

Contributing

Pull requests and bug reports are welcome. Happy coding 🤍

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft