I made some fixes and since it took me some time, would like to share for everyone to know.
On the jquery.localize.js simple declare a global variable the top of the file "var globallanguage;"
at the line somewhere around 183 where "lang" is declared simple after that, add the
"globallanguage=lang;"
Then you may go at any file you want and simple add the below code...
I made some fixes and since it took me some time, would like to share for everyone to know. On the jquery.localize.js simple declare a global variable the top of the file "var globallanguage;" at the line somewhere around 183 where "lang" is declared simple after that, add the "globallanguage=lang;"
Then you may go at any file you want and simple add the below code...
$("[data-localize]").localize("folder/where/your/json/file/is/", { language: globallanguage, //taking from localize.jquery callback: function(data, defaultCallback) {message = data.alert.incidentalert.MESSAGE; defaultCallback(data); }}); alert(message);
Now at the file with this code, you may use translated strings according to the language you have choosed.