在 vuetify 上安装翻译的脚本在哪里?
我检查一下:https://vuetifyjs.com/en/customization/internationalization ,但我没找到
我找到了一些引用,就像这样:npm install vue-i18n
和一些像这样的引用:vue create vue-internationalization
如果我在文档中看到,似乎有两个选项可以做到这一点
哪个选项最好以及如何做?
最佳答案
国际化不需要添加新的库 vue-i18n,您可以在 vuetify 中添加插件来完成。
如果您需要粒度控制和基本选项的附加功能,可以使用 vue-i18n
Its pretty straight forward, just create a new file in this path src/plugins/vuetify.js and set up the configuration with atleast 2 languages and you can update the current language using
this.$vuetify.lang.current = "selected language"
关于javascript - 如何在 vuetify 上安装翻译?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58584464/