For a long time, Vue I18n has been used in Vue.js to achieve international multi-language Settings. In the past, it was tedious to find the file and write the translation manually.

I learned from a colleague that a great VS Code plugin, i18n-ally, can build and automate translation, and share it with everyone, as well as make my own record.



Moreover, i18n-ally is the official recommended third party tool, really is easy to use, who uses who knows.

Start by installing the i18n-ally plug-in in VS Code.

Second, this is the configuration, as follows: settings.json:

// After installing the plugin, you may create the following paths in your workspace: "i18n-ally. LocalesPaths ": [" SRC /i18n"]. "nested", "i18n-ally.namespace": true, "i18n-ally.enabledParsers": [ "json", "js" ], "i18n-ally.sortKeys": true, "i18n-ally.sourceLanguage": "zh-hans", "i18n-ally.displayLanguage": "en-us",

Then, change the previous JS file to JSON format, and you can use it. The documentation on GitHub provides a lot of demonstration, which will not be repeated here.