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

data attributes aren't translated? #45

Closed
larsboldt opened this issue Aug 24, 2016 · 6 comments
Closed

data attributes aren't translated? #45

larsboldt opened this issue Aug 24, 2016 · 6 comments

Comments

@larsboldt
Copy link

Why isn't data-placeholder="{{ $t('path.to.key') }} being translated when all the other "translations" are working, is it because its a data attribute? Shouldn't those work as well?

@larsboldt
Copy link
Author

It seems the problem is that a Vue directive to apply select2 (https://select2.github.io/) to a select box runs before the translation happens. Select2 picks up the value of data-placeholder before the translation occurs.

Any ideas how to fix this?

@larsboldt
Copy link
Author

I tried with other values and they arent being processed either, so it isnt a vue-i18n issue. Closing and moving issue to vue.

@mygaochunming
Copy link

hi,does this issue solved?I have the same problem with you and look forward to your answer. thank you!

@mygaochunming
Copy link

I have solved this issue. Hope it will help you.https://jsfiddle.net/2av8r31w/3/

@gryphon2411
Copy link

I guess what @mygaochunming wrote, specifically the usage of v-bind, is something that should be inserted into the documentation, in case that this is the correct way of solving this issue.

@pascalabo
Copy link

Thanks a lot!

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