Closed i-vision closed 12 years ago
I have run into a similar issue. I'm currently working around this by calling localize before I load the jQuery Mobile JS file.
I am currently working on some sort of workaround for this at https://github.com/johnallers/jquery-localize/tree/jqm-support
I have added a new option childSelector
which applies localization to a child element, if a match is found. If no match is found, localization is applied to the element as it normally would.
For use with jQuery Mobile 1.0.1, apply localization to the .ui-btn-text
element as such:
$.localize("[rel*=localize]", { language: "fr", childSelector: ".ui-btn-text" });
I havent tried but I think you should run the localize function within a pagecreate callback function.
I've made a little test and it's working flawlessly. Just do it in this way:
$(document).on('pagecreate','#home',function(event){
$("[rel*=localize]").localize("index")
});
$('#home').live('pagecreate',function(event){
$("[rel*=localize]").localize("index")
});
Where #home is the ID of the page.
https://skitch.com/shadow450/8xjya/captura-de-pantalla-2012-04-03-a-la-s-13.50.46
That makes a lot more sense than what I was trying to do.
Thanks Belelros!
@Belelros Thanks for answering this!
Hello, thanks for great plugin.
Plugin have some issues if is using with JQM.
For example:
This: Reset
should to display button, but with using with rel attr is button deformed.
I tried use other attr's than rel, fxp: i18n but still same result.
I think, that problem should be via Ajax loading of pages in JQM.
I will glad if any fix.
Greeting
Jiri