/**
* 根据查询当前语言环境下key对应的国际化字符串
*
* @param key
* @return
*/
function getI18nText(key)
{
if (resource.hasOwnProperty(key))
{
var resKey = "resource." + key;
return eval(resKey);
} else
{
$.ajax({
type: "POST",
url: "i18nAjaxAction.action",
data: "key="+key,
async: false,
success: function(data){
eval("resource." + key + "=\"" + data+"\"");
}
});
var resKey = "resource." + key;
return eval(resKey);
}
}
* 根据查询当前语言环境下key对应的国际化字符串
*
* @param key
* @return
*/
function getI18nText(key)
{
if (resource.hasOwnProperty(key))
{
var resKey = "resource." + key;
return eval(resKey);
} else
{
$.ajax({
type: "POST",
url: "i18nAjaxAction.action",
data: "key="+key,
async: false,
success: function(data){
eval("resource." + key + "=\"" + data+"\"");
}
});
var resKey = "resource." + key;
return eval(resKey);
}
}