Fix: decimal support for italian language

This commit is contained in:
Laurent Destailleur 2008-10-20 02:18:54 +00:00
parent dad1e55637
commit 742b775f37
3 changed files with 8 additions and 4 deletions

View File

@ -2101,6 +2101,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=-1)
if ($langs->trans("SeparatorDecimal") != "SeparatorDecimal") $dec=$langs->trans("SeparatorDecimal"); if ($langs->trans("SeparatorDecimal") != "SeparatorDecimal") $dec=$langs->trans("SeparatorDecimal");
if ($langs->trans("SeparatorThousand")!= "SeparatorThousand") $thousand=$langs->trans("SeparatorThousand"); if ($langs->trans("SeparatorThousand")!= "SeparatorThousand") $thousand=$langs->trans("SeparatorThousand");
//print 'x'.$dec.$thousand.'-';
if ($alreadysqlnb != 1) // If not a PHP number or unknown, we change format if ($alreadysqlnb != 1) // If not a PHP number or unknown, we change format
{ {
if ($thousand != ',' && $thousand != '.') $amount=str_replace(',','.',$amount); // To accept 2 notations for french users if ($thousand != ',' && $thousand != '.') $amount=str_replace(',','.',$amount); // To accept 2 notations for french users

View File

@ -265,8 +265,11 @@ class Translate {
//if ($this->charset_inputfile == 'UTF-8') $value=utf8_decode($value); //if ($this->charset_inputfile == 'UTF-8') $value=utf8_decode($value);
if ($this->charset_inputfile == 'ISO-8859-1') $value=utf8_encode($value); if ($this->charset_inputfile == 'ISO-8859-1') $value=utf8_encode($value);
//$this->setTransFromTab($key,$value); // We do not load Separator values for alternate files
$this->tab_translate[$key]=$value; if (! $alt || (! eregi('^Separator',$key)))
{
$this->tab_translate[$key]=$value;
}
if ($enablelangcacheinsession) $tabtranslatedomain[$key]=$value; // To save lang in session if ($enablelangcacheinsession) $tabtranslatedomain[$key]=$value; // To save lang in session
} }
} }