equal
deleted
inserted
replaced
7 if ( typeof(enano_lang) != 'object' ) |
7 if ( typeof(enano_lang) != 'object' ) |
8 return false; |
8 return false; |
9 if ( typeof(enano_lang[lang_id]) != 'object' ) |
9 if ( typeof(enano_lang[lang_id]) != 'object' ) |
10 return false; |
10 return false; |
11 this.strings = enano_lang[lang_id]; |
11 this.strings = enano_lang[lang_id]; |
|
12 this.lang_id = lang_id; |
12 |
13 |
13 this.get = function(string_id, subst) |
14 this.get = function(string_id, subst) |
14 { |
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 } |
15 var catname = string_id.substr(0, string_id.indexOf('_')); |
24 var catname = string_id.substr(0, string_id.indexOf('_')); |
16 var string_name = string_id.substr(string_id.indexOf('_') + 1); |
25 var string_name = string_id.substr(string_id.indexOf('_') + 1); |
17 if ( typeof(this.strings[catname]) != 'object' ) |
26 if ( typeof(this.strings[catname]) != 'object' ) |
18 return string_id; |
27 return string_id; |
19 if ( typeof(this.strings[catname][string_name]) != 'string' ) |
28 if ( typeof(this.strings[catname][string_name]) != 'string' ) |