* (bug 19286) Correct commafying function in Polish (pl)
[lhc/web/wiklou.git] / languages / classes / LanguageDe.php
1 <?php
2 /** German
3 *
4 * @ingroup Language
5 */
6 class LanguageDe extends Language {
7
8 /*
9 * FIXME: Comment is wrong, decimals prevent space suppression
10 * German numeric format is "12 345,67" but "1234,56"
11 * Copied from LanguageUk.php
12 */
13
14 function commafy($_) {
15 if (!preg_match('/^\d{1,4}$/',$_)) {
16 return strrev((string)preg_replace('/(\d{3})(?=\d)(?!\d*\.)/','$1,',strrev($_)));
17 } else {
18 return $_;
19 }
20 }
21 }