2
0
forked from Wavyzz/dolibarr

New: Can use "Space" as value for SeparatorThousand into language files

This commit is contained in:
Laurent Destailleur
2014-04-06 21:18:21 +02:00
parent a2531872cb
commit 1c21c00fb6
3 changed files with 6 additions and 4 deletions

View File

@@ -2724,6 +2724,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
if ($outlangs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") $dec=$outlangs->transnoentitiesnoconv("SeparatorDecimal"); if ($outlangs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") $dec=$outlangs->transnoentitiesnoconv("SeparatorDecimal");
if ($outlangs->transnoentitiesnoconv("SeparatorThousand")!= "SeparatorThousand") $thousand=$outlangs->transnoentitiesnoconv("SeparatorThousand"); if ($outlangs->transnoentitiesnoconv("SeparatorThousand")!= "SeparatorThousand") $thousand=$outlangs->transnoentitiesnoconv("SeparatorThousand");
if ($thousand == 'None') $thousand=''; if ($thousand == 'None') $thousand='';
else if ($thousand == 'Space') $thousand=' ';
//print "outlangs=".$outlangs->defaultlang." amount=".$amount." html=".$form." trunc=".$trunc." nbdecimal=".$nbdecimal." dec='".$dec."' thousand='".$thousand."'<br>"; //print "outlangs=".$outlangs->defaultlang." amount=".$amount." html=".$form." trunc=".$trunc." nbdecimal=".$nbdecimal." dec='".$dec."' thousand='".$thousand."'<br>";
//print "amount=".$amount."-"; //print "amount=".$amount."-";
@@ -2799,6 +2800,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
if ($langs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") $dec=$langs->transnoentitiesnoconv("SeparatorDecimal"); if ($langs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") $dec=$langs->transnoentitiesnoconv("SeparatorDecimal");
if ($langs->transnoentitiesnoconv("SeparatorThousand")!= "SeparatorThousand") $thousand=$langs->transnoentitiesnoconv("SeparatorThousand"); if ($langs->transnoentitiesnoconv("SeparatorThousand")!= "SeparatorThousand") $thousand=$langs->transnoentitiesnoconv("SeparatorThousand");
if ($thousand == 'None') $thousand=''; if ($thousand == 'None') $thousand='';
elseif ($thousand == 'Space') $thousand=' ';
//print "amount=".$amount." html=".$form." trunc=".$trunc." nbdecimal=".$nbdecimal." dec='".$dec."' thousand='".$thousand."'<br>"; //print "amount=".$amount." html=".$form." trunc=".$trunc." nbdecimal=".$nbdecimal." dec='".$dec."' thousand='".$thousand."'<br>";
// Convert value to universal number format (no thousand separator, '.' as decimal separator) // Convert value to universal number format (no thousand separator, '.' as decimal separator)

View File

@@ -1,6 +1,6 @@
# Dolibarr language file - fr_BE - main # Dolibarr language file - fr_BE - main
SeparatorDecimal=, SeparatorDecimal=,
SeparatorThousand= SeparatorThousand=Space
FormatDateShort=%d/%m/%Y FormatDateShort=%d/%m/%Y
FormatDateShortInput=%d/%m/%Y FormatDateShortInput=%d/%m/%Y
FormatDateShortJava=dd/MM/yyyy FormatDateShortJava=dd/MM/yyyy

View File

@@ -7,7 +7,7 @@ DIRECTION=ltr
FONTFORPDF=helvetica FONTFORPDF=helvetica
FONTSIZEFORPDF=10 FONTSIZEFORPDF=10
SeparatorDecimal=, SeparatorDecimal=,
SeparatorThousand=None SeparatorThousand=Space
FormatDateShort=%d/%m/%Y FormatDateShort=%d/%m/%Y
FormatDateShortInput=%d/%m/%Y FormatDateShortInput=%d/%m/%Y
FormatDateShortJava=dd/MM/yyyy FormatDateShortJava=dd/MM/yyyy