client/js/main.js
changeset 66 9b459e41e2df
parent 64 3a5a9421687b
child 68 803dbeb7c919
--- a/client/js/main.js	Tue Feb 26 11:09:57 2013 +0100
+++ b/client/js/main.js	Tue Feb 26 17:04:24 2013 +0100
@@ -67,7 +67,7 @@
         this.main_$ = Rkns.$('<div>')
             .addClass("Rk-Bin-Main")
             .appendTo(this.$)
-            .html('<h4 class="Rk-Bin-Loading">' + _renkan.l10n.loading_bin + '</h4>');
+            .html('<h4 class="Rk-Bin-Loading">' + _renkan.translate("Loading, please wait") + '</h4>');
         this.title_$.html(_opts.title || '(new bin)');
         this.renkan.resizeBins();
         
@@ -112,7 +112,9 @@
     this.language = _opts.language;
     this.static_url = _opts.static_url;
     this.read_only = _opts.read_only;
-    this.l10n = Rkns.i18n[_opts.language];
+    this.translate = function(_text) {
+    	return (Rkns.i18n[_opts.language] || Rkns.i18n[_opts.language.substr(0,2)] || {})[_text] || _text;
+    }
     if (typeof _opts.user_id !== "undefined") {
         this.current_user = _opts.user_id;
     }