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

automatic rerender of translated data properties #258

Closed
measwel opened this issue Nov 27, 2017 · 4 comments
Closed

automatic rerender of translated data properties #258

measwel opened this issue Nov 27, 2017 · 4 comments

Comments

@measwel
Copy link

measwel commented Nov 27, 2017

When I set a translation like this:
v-bind:label="$t('message.website')"
Then the view is updated at once when I change the locale.

However, if I set a translation for a data item like this:
label: this.$t('message.labelimage')
Then the view is not updated when changing the locale.

I have to reload the page to see the translation. Is there a way to have the view rerended automatically with new translations for data items too?

kazupon pushed a commit that referenced this issue Dec 14, 2017
* bug(extend) Fix this not found

* 👕test(issues) featrue #258 test
@kazupon
Copy link
Owner

kazupon commented Dec 25, 2017

close (fixed at #260)

@kazupon kazupon closed this as completed Dec 25, 2017
@mertindervish
Copy link

I'm facing the same issue in v7.3.3. After changing locale the translations used in data() are not updated. Reproduction link: https://codepen.io/mertindervish/pen/jYmgya

@sunshuaisky
Copy link

@mertindervish You should use v-t. link:https://codepen.io/anon/pen/mpwqoN

@mertindervish
Copy link

mertindervish commented Jan 3, 2018

My use case requires the translation to be accessible by the component in created() without duplicating the translation key. I solved the problem using computed properties insted of data().

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

4 participants