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.
- Creates a new key in a JSON locale file
- Replaces selected text with a reference to that key
- Supports custom locale file path
- 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
- If your key exists, it throw error!
The extension can be configured with the following settings:
createLocaleKey.localeFilePath: The file path to the JSON locale file (default:
createLocaleKey.withBrackets: Whether to format the replacement reference with brackets (default:
Initial release of Create Locale Key
Pull requests and bug reports are welcome on GitHub.