[Jifty-commit] r4296 - jifty/trunk/share/web/static/js
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Oct 23 04:04:22 EDT 2007
Author: clkao
Date: Tue Oct 23 04:04:22 2007
New Revision: 4296
Modified:
jifty/trunk/share/web/static/js/loc.js
Log:
allow switching current language for Localization.
Modified: jifty/trunk/share/web/static/js/loc.js
==============================================================================
--- jifty/trunk/share/web/static/js/loc.js (original)
+++ jifty/trunk/share/web/static/js/loc.js Tue Oct 23 04:04:22 2007
@@ -9,15 +9,18 @@
Localization.show_dates_as_local_time();
})
},
+ switch_dict: function(lang) {
+ this.dict = this.load_dict(lang);
+ },
load_dict: function(lang) {
var d;
new Ajax.Request(
- this.dict_path + "/" + this.lang + ".json",
+ this.dict_path + "/" + lang + ".json",
{
method: 'get',
asynchronous: false,
onComplete: function(t, obj) {
- eval("d = " + t.responseText);
+ eval("d = " + t.responseText || "{}");
}
}
);
More information about the Jifty-commit
mailing list