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.
Features
- Creates a new key in a JSON locale file
- Replaces selected text with a reference to that key
- Supports custom locale file path
Usage
- Select the text you want to create a key for
- Open the command palette (
Ctrl + Shift + P or Cmd + Shift + P )
- Search for
EH i18n - Create Locale Key and select it
- Enter a unique key for the selected text when prompted
- The selected text will be replaced with a reference to the new key

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

- If your key exists, it throw error!

Configuration
The extension can be configured with the following settings:
createLocaleKey.localeFilePath : The file path to the JSON locale file (default: locales/en.json )
createLocaleKey.withBrackets : Whether to format the replacement reference with brackets (default: false )
Known Issues
Release Notes
1.0.0
Initial release of Create Locale Key
Contributing
Pull requests and bug reports are welcome on GitHub.
| |