From: Tim Starling Date: Mon, 13 Feb 2006 09:09:54 +0000 (+0000) Subject: Fixed formatNum X-Git-Tag: 1.6.0~340 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=6b6ecc5d0ff8449e3a1f7781d647da4f94235fd8;p=lhc%2Fweb%2Fwiklou.git Fixed formatNum --- diff --git a/languages/LanguageAf.php b/languages/LanguageAf.php index c25ceca948..8e129610a6 100644 --- a/languages/LanguageAf.php +++ b/languages/LanguageAf.php @@ -70,7 +70,17 @@ class LanguageAf extends LanguageUtf8 { } function formatNum( $number, $year = false ) { - return !$year ? strtr($this->commafy($number), '.,', ',.' ) : $number; + # South Africa uses space for thousands and comma for decimal + # Reference: AWS Reël 7.4 p. 52, 2002 edition + # glibc is wrong in this respect in some versions + if ( $year ) { + return $number; + } else { + return strtr($this->commafy($number), array( + '.' => ',', + ',' => "\xc2\xa0" // non-breaking space + )); + } } }