- Pman.Login.intervalID = window.setInterval(function() {
- Pman.Login.check(false);
- }, 120000); // every 120 secs = 2mins..
+
+ },
+
+
+ switchLang : function (lang)
+ {
+ _T = typeof(_T) == 'undefined' ? false : _T;
+ if (!_T || !lang.length) {
+ return;
+ }
+
+ if (!_T && lang != 'en') {
+ Roo.MessageBox.alert("Sorry", "Language not available yet (" + lang +')');
+ return;
+ }
+
+ if (typeof(_T.en) == 'undefined') {
+ _T.en = {};
+ Roo.apply(_T.en, _T);
+ }
+
+ if (typeof(_T[lang]) == 'undefined') {
+ Roo.MessageBox.alert("Sorry", "Language not available yet (" + lang +')');
+ return;
+ }
+
+
+ Roo.apply(_T, _T[lang]);
+ // just need to set the text values for everything...
+ var _this = this;
+ /* this will not work ...
+ if (this.form) {
+
+
+ function formLabel(name, val) {
+ _this.form.findField(name).fieldEl.child('label').dom.innerHTML = val;
+ }
+
+ formLabel('password', "Password"+':');
+ formLabel('username', "Email Address"+':');
+ formLabel('lang', "Language"+':');
+ this.dialog.setTitle("Login");
+ this.dialog.buttons[0].setText("Forgot Password");
+ this.dialog.buttons[1].setText("Login");
+ }
+ */