d6d34090d0650f8cf18f333180128fd6a4d1c613
[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 }