17 lines
418 B
JavaScript
17 lines
418 B
JavaScript
|
function getLocalString(language, descriptor){
|
||
|
if(global_strings[language]){
|
||
|
return global_strings[language][descriptor] || global_strings["english"][descriptor] || descriptor
|
||
|
} else {
|
||
|
return descriptor
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function getDescriptorByLocalString(language, localString){
|
||
|
for(string in global_strings[language]){
|
||
|
if(global_strings[language][string] == localString){
|
||
|
return string
|
||
|
}
|
||
|
}
|
||
|
return localString
|
||
|
}
|