i18n-json-editor is a Visual Studio Code extension to easily edit your json translations files.
i18n-json-editor can be used in two ways :
- Right click on a folder named i18n and select : i18n JSON Editor
Folder name can be changed with i18nJsonEditor.supportedFolders
- Within a workspace you can edit several folders at the same time. Click on i18n editor presents in the Status Bar
i18nJsonEditor.workspaceFolders must be set
- To use a translation service defined :
i18nJsonEditor.translationService and i18nJsonEditor.translationServiceApiKey
- i18nJsonEditor.forceKeyUPPERCASE : Force the keys to uppercase (default : true)
"i18nJsonEditor.forceKeyUPPERCASE": false
- i18nJsonEditor.jsonSpace : A String or Number that's used to insert white space into the output JSON (default : 2)
For more information, have a look on the JSON.stringify() method.
"i18nJsonEditor.jsonSpace": 5
- i18nJsonEditor.lineEnding : String used to signify the end of a line (default : "\n")
"i18nJsonEditor.lineEnding": "\r\n"
- i18nJsonEditor.keySeparator : String to separate keys, or false if no separator is preferred (default : ".")
"i18nJsonEditor.keySeparator": "/"
- i18nJsonEditor.supportedFolders : An array of folder names that's used to open the extension through the right click (default : ["i18n"])
Restart Visual Studio Code after changing the value
"i18nJsonEditor.supportedFolders": [
"i18n",
"locales"
]
- i18nJsonEditor.translationService : Specified wich translation service to use (Only Microsoft translator is currently available)
"i18nJsonEditor.translationService" : "MicrosoftTranslator"
- i18nJsonEditor.translationServiceApiKey : Api key used by the translation service
"i18nJsonEditor.translationServiceApiKey": "**********"
- i18nJsonEditor.workspaceFolders : An array of objects to specify which folders are used to manage your translations
"i18nJsonEditor.workspaceFolders": [
{ "name": "Common", "path": "./i18n" },
{ "name": "Portal", "path": "./portal/locales" }
]
Vanderseypen Thibault (https://vanderseypen.dev)