就是i18n了. 要在.vue 组件里用,还有点不同:

https://blog.csdn.net/qq_25324335/article/details/80767749

yarn 安装依赖:

yarn add vue-i18n
yarn add --dev @kazupon/vue-i18n-loader vue-cli-plugin-i18n

因为没直接用 webpack,laravel-mix 的配置有些不同,看了这个几个帖子:

https://laracasts.com/discuss/channels/vue/using-vue-i18n-single-file-components-with-laravel-mix

https://stackoverflow.com/questions/46787646/vue-i18n-single-file-component-in-laravel-project/46810772#46810772

https://github.com/JeffreyWay/laravel-mix/issues/1882

https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-vue-app-with-vue-i18n

特别注意 laravel-mix 的版本,我的是 2.14.

终极解决方案在这里: http://kazupon.github.io/vue-i18n/guide/sfc.html#laravel-mix