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
can I specify an element to be translates the same way as title attributes are handled? #77
Comments
Actually there is no way to do this right now. But i added eg.:
will this be what you need? |
Perfect! Vielen Dank! |
on second thought: what if I use |
Never mind. Very nice! |
Nope only one element - but if you need it feel free to open another issue - will than be added to next release. |
Ok. I do have one more thing/idea to make i18next fully-usable with jquery mobile: Some widgets reformat from something like this:
to this:
So question would be, when specifying a target Thanks |
Wonder if lookup from parent is the only case? If not i would prefer an option to just override the default function to get the element to set translations on - so it can be configured freely. |
Give me some time, I will translate an application with a pretty much all Jquery Mobile widgets. Then I will see if |
so I'm thinking:
Idea is to wait until all translations are made and then run the JQM enhancements from the callback. This way the correct texts will be in the source code by the time JQM starts modifying elements and there would be no need to worry about destinations of some text elements. |
nice idea - could be usefull in other scenarios as well. |
problem is if you are translating elements with multiple attributes ( I tried a little with triggering a custom event when inside addJqueryFunct
There should be a better way :-) |
We for sure find a good solution. Will have a look the next days/week. |
sorry had no time to get back onto this one. did you found any nicer solution? in the current state i prefer not adding this? |
@jamuhl : no problem. The only challenge is the initial translation, because JQM "create" (the method which adds extra elements, including text containers) does not have a callback, so I never know when to call translate i18n() I cheated myself out of the problem by just adding the default language hardcoded in the HTML, so I start with... English and when the user switches, i18n can access all elements, because they are there. So I'm cool with Thanks for coming back with this. |
perfect...glad you found a solution. |
More a question, than an issue, but maybe you can help:
I'm working on a Jquery Mobile application using your plugin.
Following problem: I'm using a Jquery Mobile navbar so my inital HTML markup is like this:
Problem is, Jquery Mobile changes the
<a href=...>
into this:So my
i18n
translation should not go on the<a>
element, but on the childui-btn-text
span.Any idea if it's possible to specify a "target" of where the translated text should be appended to?
Thanks for your great plugin! Really nice working with it :-)
The text was updated successfully, but these errors were encountered: