Json I18n Key is a Visual Studio Code extension designed to streamline internationalization (i18n) workflows in JSON files. It provides efficient key-path translations, hover tooltips, auto-completion, renaming keys, and AI-powered translation suggestions using GitHub Copilot. The extension helps developers easily manage translation keys across multiple language files.
This project was inspired by jsonyamlkeynavigator, and some of its code has been adapted to suit the needs of this extension.
Features
Find Translation Key: Quickly locate and navigate to a translation key in your JSON translation files.
Add Translation Key: Add new translation keys seamlessly across multiple language files (e.g., English, Arabic).
Rename Translation Key: Rename translation keys in all translation files where they exist.
Hover to View Translation: See the translation of a key while hovering over it in the editor.
Auto-completion: Get suggestions for translation keys while typing, making it easier to use and manage your i18n keys.
Multi-language Support: Supports various languages like en, ar, or any other language files configured.
Copilot AI Auto-Translate: Automatically generate translation suggestions for new keys using GitHub Copilot AI, enhancing the translation workflow.
Translation Path Configuration: Customize your translation file paths and define the default language in your project’s settings.
Search Keys and Values: Search for keys or values that contain a specific string.
Suggest Existing Keys for Reuse: When adding a new translation key, the extension will suggest existing keys for reuse to avoid redundancy.
Cleanup Unused Translation Keys: Detect and clean up unused translation keys automatically.
Diagnostics and Quick Fixes: Automatically detect missing translation keys in your code and provide quick fixes to add them.
Copy Existing Translation Key: Copy values from existing translation keys to new or updated keys, ensuring consistency and saving time.
How to Use
Configure Translation Files:
Create a .vscode/settings.json file in your project and add the following configuration, adjusting the paths as needed: