Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic local changing no longer works in v6 #148

Closed
tvld opened this issue Apr 19, 2017 · 4 comments
Closed

Dynamic local changing no longer works in v6 #148

tvld opened this issue Apr 19, 2017 · 4 comments

Comments

@tvld
Copy link

tvld commented Apr 19, 2017

In v4 we used to dynamically change the language by changing Vue.config.lang object. This no longer seem to work. Bug or breaking change?

Is there a new way (API) to click on a link to dynamically change the locale whenever the Vue.config.lang changes ?

@tvld
Copy link
Author

tvld commented Apr 19, 2017

Note, I now use

  this.$i18n.locale = Vue.config.lang

But it's not particular pretty as it is not reactive...

@kazupon
Copy link
Owner

kazupon commented Apr 19, 2017

Vue.config.lang is deprecated in v6 or later.
See the docs:
https://kazupon.github.io/vue-i18n/en/migrations.html#lang-replaced

@kazupon kazupon closed this as completed Apr 19, 2017
@tvld
Copy link
Author

tvld commented Apr 19, 2017

Well..IMO: It's still a serious bug if the user base needs many hours to correct this, deprecation or not. We are in production after all.

In addition, the documentation hardly explains how to re-enable the Vue.config.lang reactivity that is spread out over our code...

So well.. closed, but not solved ;)

@polonkaig
Copy link

You can clearly see how to change the locale in the docs referenced by kazupon, and you still got the reactivity too. So if you come from a search engine, just follow that link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants