}
- function guessUsersLanguage() {
+ function guessUsersLanguage()
+ {
+ $this->sessionState(0);
$lang = !$this->authUser || empty($this->authUser->lang ) ? 'en' : $this->authUser->lang;
return explode('_', $lang);
}
- function get($s ='')
+ function get($s ='', $opts=array())
{
$this->sessionState(0);
$i = DB_DataObject::Factory('I18n');
-
+ $i->is_active = 1;
switch($s) {
case 'Lang':
foreach($langs as $lang)
{
//$rlang = array_shift(explode('_', strtoupper($lang)));
- $rlang = array_shift(explode('_', $lang));
+ $ll = explode('_', $lang);
+ $rlang = array_shift($ll);
$ar[$lang] = array();
$i = DB_DataObject::Factory('I18n');
}
//echo '<PRE>';print_r($ar);
header('Content-type: text/javascript');
+ echo "Roo.namespace('Pman.I18n');";
echo 'Pman.I18n.Data = ' . json_encode($ar);
exit;
{
static $rates = array();
- if (!empty($this->rates)) {
- return true;
+ if (!empty($rates)) {
+ $this->rates = $rates;
+ return;
}
- $this->rates = DB_DAtaObject::Factory('core_curr_rate')->currentRates();
-
+ $this->rates = $rates = DB_DAtaObject::Factory('core_curr_rate')->currentRates();
}