rt 4.2.16
[freeside.git] / rt / share / static / js / i18n.js
1 function loc_key(key) {
2     if (arguments.length > 1 && console && console.log)
3         console.log("loc_key() does not support substitution! (for key: " + key + ")")
4
5     var msg;
6     if (RT.I18N && RT.I18N.Catalog)
7         msg = RT.I18N.Catalog[key];
8
9     if (msg == null && console && console.log) {
10         console.log("I18N key '" + key + "' not found in catalog");
11         msg = "(no translation for key: " + key + ")";
12     }
13
14     return msg;
15 }