//return true;
$au = $this->getAuthUser();
//if (!$au) {
- // $this->jerr("Not authenticated", array('authFailure' => true));
+ // $this->jerror("LOGIN-NOAUTH", "Not authenticated", array('authFailure' => true));
//}
$this->authUser = $au;
$this->sessionState(0);
$lang = !$this->authUser || empty($this->authUser->lang ) ? 'en' : $this->authUser->lang;
-
- /// verify the selected language..
+ /// verify the selected language..
$i = DB_DataObject::Factory('I18n');
$i->ltype = 'l'; // string(1) not_null multiple_key
$i->lkey = $lang; // string(8) not_null
$i = DB_DataObject::Factory('I18n');
$ar[$lang]['m'] = $i->toTransList('m', $rlang);
}
+ require_once 'I18Nv2/CurrencyMap.php';
+
+ $ar['currency_map'] = I18Nv2_CurrencyMap::$s_map;
+
//echo '<PRE>';print_r($ar);
header('Content-type: text/javascript');
echo "Roo.namespace('Pman.I18n');";
if (empty($k)) {
return '??';
}
- $lang = !$au || empty($au->lang ) ? 'en' : is_string($au) ? $au : $au->lang;
+
+ if(class_exists('HTML_FlexyFramework2', false)) {
+ $fo = HTML_FlexyFramework2::get()->HTML_Template_Flexy;
+ }
+ else {
+ $fo = &PEAR::getStaticProperty('HTML_Template_Flexy','options');
+ }
+
+ $fallback_lang = empty($fo['locale']) ? 'en' : $fo['locale'];
+
+
+ $lang = empty($au ) ? $fallback_lang : (is_string($au) ? $au : $au->lang);
// does it need caching?