toName: function(type, code)
{
var ret = code;
- var lang = Pman.Login.authUser.lang || 'en';
+
+ var lang = 'en';
+
+ if(typeof(Pman.Login) != 'undefined' && typeof(Pman.Login.authUser.lang) == 'undefined'){
+ lang = Pman.Login.authUser.lang;
+ }
+
if (code.indexOf('_') > -1) {
var clang = code.split('_').shift();
var cc = code.split('_').pop();
- return this.toName('l', clang.toUpperCase()) + ' (' + this.toName('c', cc.toUpperCase()) + ')';
+ return this.toName('l', clang.toLowerCase()) + ' (' + this.toName('c', cc.toUpperCase()) + ')';
}
xtype: 'Store',
proxy: {
xtype: 'HttpProxy',
- url: baseURL + '/I18N/Country.html',
+ url: baseURL + '/Core/I18n/Country.html',
method: 'GET'
},
xtype: 'Store',
proxy: {
xtype: 'HttpProxy',
- url: baseURL + '/I18N/Lang.html',
+ url: baseURL + '/Core/I18n/Lang.html',
method: 'GET'
},
xtype: 'Store',
proxy: {
xtype: 'HttpProxy',
- url: baseURL + '/I18N/Currency.html',
+ url: baseURL + '/Core/I18n/Currency.html',
method: 'GET'
},