vue-cli-plugin-i18n icon indicating copy to clipboard operation
vue-cli-plugin-i18n copied to clipboard

Double configuration for `locale`, `fallbackLocale` & `localeDir`

Open ssc-hrep3 opened this issue 7 years ago • 3 comments

The locale, the fallbackLocale and the localeDir is defined in i18n.js as well as in the pluginOptions of vue.config.js. How come? What's the benefit?

I've now removed those properties from vue.config.js and it still works as expected. I generated the project with SFC enabled.

ssc-hrep3 avatar Aug 14 '18 14:08 ssc-hrep3

Having the same question. Also in the Vue UI there is seemingly another definition. I set everything to locale de and fallback en (vue.config.js and .env file and also the fallbacks in i18n.js) and in the Vue UI under the Localizations tab the default language is still en, but de is also available there.

legg681 avatar Mar 02 '20 20:03 legg681

And it seems changing pluginOptions.i18n.locale or pluginOptions.i18n.fallbackLocale in vue.config.js has no effect. The value always refers to i18n.js.

But removing pluginOptions.i18n completely from vue.config.js yields TypeError: Cannot read property 'i18n' of undefined error..

1isten avatar Mar 09 '20 15:03 1isten

I've tried pluginOptions.i18n.locale and pluginOptions.i18n.fallbackLocale in v2.3.1. It still has no effect for the locale of the project or vue ui.

kingyue737 avatar Dec 14 '21 08:12 kingyue737