Fix: Translation of currency works better now.

This commit is contained in:
Laurent Destailleur
2009-11-06 21:43:29 +00:00
parent c73c31434d
commit 64c9991efd
4 changed files with 123 additions and 86 deletions

View File

@@ -368,20 +368,16 @@ class Translate {
{
global $db;
$newstr=$key;
if (preg_match('/CurrencyShort([A-Z]+)$/i',$key,$reg))
if (preg_match('/CurrencySing([A-Z][A-Z][A-Z])$/i',$key,$reg))
{
global $db;
//$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','labelshort');
$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','code');
$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','labelsing');
}
else if (preg_match('/Currency([A-Z]+)$/i',$key,$reg))
else if (preg_match('/Currency([A-Z][A-Z][A-Z])$/i',$key,$reg))
{
global $db;
$newstr=$this->getLabelFromKey($db,$reg[1],'c_currencies','code_iso','label');
}
else if (preg_match('/SendingMethod([0-9A-Z]+)$/i',$key,$reg))
{
global $db;
$newstr=$this->getLabelFromKey($db,$reg[1],'expedition_methode','code','libelle');
}
return $newstr;