-
Notifications
You must be signed in to change notification settings - Fork 144
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
Why data() not attr() #172
Comments
I think you should add check for attributes too:) |
I have the same problem. How did you solve it? |
@benno-meyer Set attr and then data. Or set data and then attr, don`t remember. So need two operations instead of one. |
Ah, I see. Thank you so much for your help! |
I have a little problem here
https://github.com/wikimedia/jquery.i18n/blob/master/src/jquery.i18n.js#L230
For case of using data-bind="attr: {data-i18n: somevar}"
And in the end if I change somevar translation will not changed in my page.
Maybe this is problem of data-bind. I don`t know.
I added class and update data before each translation with next script:
for (let i =0; i < elements.length; i++) {
$(element).data('i18n', $ (element).attr('data-i18n'));
}
$('[data-i18n]').i18n();
The text was updated successfully, but these errors were encountered: