mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Fix: Translation of currency works better now.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user