From 1c21c00fb61da73e24a6cf435beb8571d94b4598 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Apr 2014 21:18:21 +0200 Subject: [PATCH] New: Can use "Space" as value for SeparatorThousand into language files --- htdocs/core/lib/functions.lib.php | 6 ++++-- htdocs/langs/fr_BE/main.lang | 2 +- htdocs/langs/fr_FR/main.lang | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 5b52ba0a44b..46cc8e79991 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -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("SeparatorThousand")!= "SeparatorThousand") $thousand=$outlangs->transnoentitiesnoconv("SeparatorThousand"); 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."'
"; //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("SeparatorThousand")!= "SeparatorThousand") $thousand=$langs->transnoentitiesnoconv("SeparatorThousand"); if ($thousand == 'None') $thousand=''; + elseif ($thousand == 'Space') $thousand=' '; //print "amount=".$amount." html=".$form." trunc=".$trunc." nbdecimal=".$nbdecimal." dec='".$dec."' thousand='".$thousand."'
"; // Convert value to universal number format (no thousand separator, '.' as decimal separator) @@ -4493,7 +4495,7 @@ function printCommonFooter($zone='private') /** * Split a string with 2 keys into key array. * For example: "A=1;B=2;C=2" is exploded into array('A'=>1,'B'=>2,'C'=>3) - * + * * @param string $string String to explode * @param string $delimiter Delimiter between each couple of data * @param string $kv Delimiter between key and value @@ -4501,7 +4503,7 @@ function printCommonFooter($zone='private') */ function dolExplodeIntoArray($string, $delimiter = ';', $kv = '=') { - if ($a = explode($delimiter, $string)) + if ($a = explode($delimiter, $string)) { foreach ($a as $s) { // each part if ($s) { diff --git a/htdocs/langs/fr_BE/main.lang b/htdocs/langs/fr_BE/main.lang index 430736a6bca..c9b618123d3 100644 --- a/htdocs/langs/fr_BE/main.lang +++ b/htdocs/langs/fr_BE/main.lang @@ -1,6 +1,6 @@ # Dolibarr language file - fr_BE - main SeparatorDecimal=, -SeparatorThousand= +SeparatorThousand=Space FormatDateShort=%d/%m/%Y FormatDateShortInput=%d/%m/%Y FormatDateShortJava=dd/MM/yyyy diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 60964676893..82f99f43c7a 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -7,7 +7,7 @@ DIRECTION=ltr FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=, -SeparatorThousand=None +SeparatorThousand=Space FormatDateShort=%d/%m/%Y FormatDateShortInput=%d/%m/%Y FormatDateShortJava=dd/MM/yyyy