-
Notifications
You must be signed in to change notification settings - Fork 121
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
this.$moment().locale(lang) does not works #40
Comments
I think this issue would be solved by PR #37 |
Hello, great news. I'll try it tonight or tomorrow. Stay tuned :) |
I'm sorry but I think PR does not fix my issue 😢 |
ok, so I think the ordering of the imports of the locales is important as it uses the last import as the default locale. If I want 'en-gb' as my default, but an option to use 'fr', I order my imports like this... import 'moment/locale/fr'
import 'moment/locale/en-gb' This is the code I have put in my mounted method mounted() {
console.log(this.$moment.locale())
this.$moment.locale('fr')
console.log(this.$moment.locale())
this.$moment.locale('en-gb')
console.log(this.$moment.locale())
}, Which outputs...
Which is what I believe we are after? |
I think this is fixed now |
nuxt 2 |
Hello, I want to change locale with a user click event on button.
I have the following
And then, using in component:
When I call the function from the button, I got the following
Is it possible to update the moment locale this way?
The text was updated successfully, but these errors were encountered: