Load new message catalogs using jquery.i18n
This commit is contained in:
parent
ebbafd5977
commit
2356656b50
@ -69,7 +69,10 @@ public class LoadLanguageCommand extends Command {
|
|||||||
response.setCharacterEncoding("UTF-8");
|
response.setCharacterEncoding("UTF-8");
|
||||||
response.setContentType("application/json");
|
response.setContentType("application/json");
|
||||||
try {
|
try {
|
||||||
json.write(response.getWriter());
|
JSONObject fullJson = new JSONObject();
|
||||||
|
fullJson.put("dictionary", json);
|
||||||
|
fullJson.put("lang", lang);
|
||||||
|
fullJson.write(response.getWriter());
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
logger.error("Error writing language labels to response stream");
|
logger.error("Error writing language labels to response stream");
|
||||||
}
|
}
|
||||||
|
@ -48,10 +48,11 @@ $.ajax({
|
|||||||
// lang : lang
|
// lang : lang
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
dictionary = data;
|
dictionary = data['dictionary'];
|
||||||
|
lang = data['lang'];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$.i18n.setDictionary(dictionary);
|
$.i18n().load(dictionary, lang);
|
||||||
// End internationalization
|
// End internationalization
|
||||||
|
|
||||||
Refine.selectActionArea = function(id) {
|
Refine.selectActionArea = function(id) {
|
||||||
|
@ -44,10 +44,11 @@ module : "core",
|
|||||||
//lang : lang
|
//lang : lang
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
dictionary = data;
|
dictionary = data['dictionary'];
|
||||||
|
lang = data['lang'];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$.i18n.setDictionary(dictionary);
|
$.i18n().load(dictionary, lang);
|
||||||
//End internationalization
|
//End internationalization
|
||||||
|
|
||||||
function deDupUserMetaData(arrObj) {
|
function deDupUserMetaData(arrObj) {
|
||||||
|
@ -45,10 +45,11 @@ $.ajax({
|
|||||||
// lang : lang
|
// lang : lang
|
||||||
},
|
},
|
||||||
success : function(data) {
|
success : function(data) {
|
||||||
dictionary = data;
|
dictionary = data['dictionary'];
|
||||||
|
lang = data['lang'];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$.i18n.setDictionary(dictionary);
|
$.i18n().load(dictionary, lang);
|
||||||
// End internationalization
|
// End internationalization
|
||||||
|
|
||||||
var Refine = {
|
var Refine = {
|
||||||
|
Loading…
Reference in New Issue
Block a user