vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.75k stars 6.33k forks source link

Do not assume I want a language other than english just because my location isn't US based. #2688

Open edarioq opened 6 years ago

edarioq commented 6 years ago

Version

3.0.4

Node and OS info

Node 8x, NPM 5, MacOS Mojave

Steps to reproduce

Run vue ui and you assume the user wants a certain language, and the choice to change it isn't obvious (or non existent because I still haven't found it)

What is expected?

I expect to be asked what my default language is.

What is actually happening?

Vue assumes I want everything in spanish. Users may very well be primary english native speakers but could live in another country or travel often.

jcmortensen commented 6 years ago

Does anyone know of a workaround? It would be much appreciated.

haoqunjiang commented 6 years ago

Here's the code snippet that @vue/cli-ui used to detect the UI language: https://github.com/vuejs/vue-cli/blob/9757f144e68ff67cce7c7656096119ee9a0db4ab/packages/%40vue/cli-ui/src/i18n.js#L7-L16

In most cases it will use window.navigator.languages[0] as default language. As far as I know Chrome users can change the preferred languages order in chrome://settings/languages