equal
deleted
inserted
replaced
11 this.strings = enano_lang[lang_id]; |
11 this.strings = enano_lang[lang_id]; |
12 this.lang_id = lang_id; |
12 this.lang_id = lang_id; |
13 |
13 |
14 this.get = function(string_id, subst) |
14 this.get = function(string_id, subst) |
15 { |
15 { |
16 if ( window.console ) |
|
17 { |
|
18 try { |
|
19 window.console.log('$lang(' + this.lang_id + '): requested string: ' + string_id); |
|
20 } |
|
21 catch(e) |
|
22 {} |
|
23 } |
|
24 var catname = string_id.substr(0, string_id.indexOf('_')); |
16 var catname = string_id.substr(0, string_id.indexOf('_')); |
25 var string_name = string_id.substr(string_id.indexOf('_') + 1); |
17 var string_name = string_id.substr(string_id.indexOf('_') + 1); |
26 if ( typeof(this.strings[catname]) != 'object' ) |
18 if ( typeof(this.strings[catname]) != 'object' ) |
27 return string_id; |
19 return string_id; |
28 if ( typeof(this.strings[catname][string_name]) != 'string' ) |
20 if ( typeof(this.strings[catname][string_name]) != 'string' ) |