I have resolved this :) Thanks Mohammed Arif http://www.mohammedarif.com
On Sep 22, 2:24 pm, Arif <[EMAIL PROTECTED]> wrote: > Even I got the issue, it's not been rendering because of French > accented characters in IE. > > So what do I need to change the JSON character encoding? > > P.S: I don't have server control, can change the front end layer > (xhtml/css/js/json) only, and will not be able to write any server > side code otherwise I could have easily done it. > > Many thanks > Mohammed Arifhttp://www.mohammedarif.com > > On Sep 22, 11:12 am, Arif <[EMAIL PROTECTED]> wrote: > > > Hi All, > > > Hope, you all would be doing well. > > > I am trying to create a language translation utility using jQuery for > > some specific words only, seems working fine in Firefox but don’t do > > well in IE 6/7. > > > Given is the JSON file, where I map headings which needs to be > > translated in French. > > > JSON Data: > > { > > "download" : "télécharger", > > "categories" : "sujets d'actualité", > > "recent_comments" : "mais que l'histoire de l'", > > "recent posts" : "Messages Récents", > > "also worthy" : "aussi digne", > > "archieves" : "archives", > > > } > > > I am able to load my JSON file successfully using $.getJSON(), it > > translates in FF but does not do the same in IE 6/7. > > > jQuery Method: > > function loadJSON(){ > > $.getJSON("json/data_ca_fr.json", function(json){ > > $(".json_trans").each(function(i){ //getting all the > > headings to > > translate > > switch($(".json_trans")[i].innerHTML) { > > case "Download": // Start here if > > $(".json_trans")[i].innerHTML > > == "download" > > $(".json_trans")[i].innerHTML = > > json.download; break;// Stop > > here > > case "Categories": // Start here if > > $(".json_trans")[i].innerHTML > > == "download" > > $(".json_trans")[i].innerHTML = > > json.categories; > > break;// Stop here > > default > > break; > > } > > }) > > }); > > > } > > > I am just comparing English words in the page through innerHTML > > because jQuery html() return the first array index only , defined > > span tag with .json_trans class for picking up all the required spans > > and do the translation. > > > I know, it’s not the robust way to do the language translation but > > does require for client and it’s not AJAX at all, just calling the > > json file on dom ready. > > > Any quick pointer/ suggestion should be appreciated. > > > Thanks for your time > > Mohammed Arifhttp://www.mohammedarif.com