cleanup and fixes for secondary data updates
[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 * @param $_ string
13 *
14 * @return string
15 */
16 function commafy( $_ ) {
17 if ( !preg_match( '/^\d{1,4}$/', $_ ) ) {
18 return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) );
19 } else {
20 return $_;
21 }
22 }
23 }