Home > Article > Development Tools > A brief discussion on vscode using i18n-ally plug-in to achieve internationalization
This article recommends a vscode plug-in "i18n-ally", which can be used to build and automate translations and achieve internationalization. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.
For a long time, Vue I18n was used in Vue.js to implement international multi-language settings. In the past, it was necessary to manually find files and write translations, which was relatively cumbersome and complicated.
Now I know a very useful vs code plug-in i18n-ally from my colleagues, which can build and automate translation, share it with everyone, and also make a record for myself.
[Recommended learning: "vscode tutorial", "vue.js tutorial"]
And , i18n-ally is an officially recommended third-party tool. It is really easy to use. Anyone who uses it will know.
First install the plug-in i18n-ally in vs code.
Secondly, this is the configuration, as follows:
settings.json:
// 安装插件后可能会自动在工作区生成这行配置 "i18n-ally.localesPaths": [ "src/i18n" ], // 以下需要自己配置 "i18n-ally.keystyle": "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, add the previous js file Change it to json format and you can use it. The documentation on github gives many demonstrations and will not be repeated here.
For more programming-related knowledge, please visit: Introduction to Programming! !
The above is the detailed content of A brief discussion on vscode using i18n-ally plug-in to achieve internationalization. For more information, please follow other related articles on the PHP Chinese website!