bb10675a96e423e9a9cc1b42d9934c465a6747f7
[lhc/web/wiklou.git] / languages / classes / LanguageBg.php
1 <?php
2
3 /** Bulgarian (Български)
4 *
5 * @ingroup Language
6 */
7 class LanguageBg extends Language {
8 /**
9 * ISO number formatting: 123 456 789,99.
10 * Avoid tripple grouping by numbers with whole part up to 4 digits.
11 */
12 function commafy($_) {
13 if (!preg_match('/^\d{1,4}$/',$_)) {
14 return strrev((string)preg_replace('/(\d{3})(?=\d)(?!\d*\.)/','$1,',strrev($_)));
15 } else {
16 return $_;
17 }
18 }
19 }