Ticket #3677: 3677.diff
File 3677.diff, 2.3 KB (added by , 18 years ago) |
---|
-
wp-includes/functions.php
86 86 function number_format_i18n($number, $decimals = null) { 87 87 global $wp_locale; 88 88 // let the user override the precision only 89 $decimals = is_null($decimals)? $wp_locale->number_format ['decimals']: intval($decimals);89 $decimals = is_null($decimals)? $wp_locale->number_format_decimals : intval($decimals); 90 90 91 return number_format($number, $decimals, $wp_locale->number_format ['decimal_point'], $wp_locale->number_format['thousands_sep']);91 return number_format($number, $decimals, $wp_locale->number_format_decimal_point, $wp_locale->number_format_thousands_sep); 92 92 } 93 93 94 94 function get_weekstartend($mysqlstring, $start_of_week) { -
wp-includes/locale.php
12 12 13 13 var $meridiem; 14 14 15 // Locale vars, can be changed in $locale.php. 15 16 var $text_direction = 'ltr'; 16 var $locale_vars = array('text_direction'); 17 // Numbers formatting. See http://www.php.net/number_format 18 var $number_format_decimals = 0; 19 var $number_format_decimal_point = '.'; 20 var $number_format_thousands_sep = ','; 21 var $locale_vars = array('text_direction', 'number_format_decimals', 'number_format_decimal_point', 22 'number_format_thousands_sep'); 17 23 18 24 function init() { 19 25 // The Weekdays … … 87 93 $this->meridiem['AM'] = __('AM'); 88 94 $this->meridiem['PM'] = __('PM'); 89 95 90 // Numbers formatting91 // See http://php.net/number_format92 93 $trans = __('number_format_decimals');94 $this->number_format['decimals'] = ('number_format_decimals' == $trans) ? 0 : $trans;95 96 $trans = __('number_format_decimal_point');97 $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;98 99 $trans = __('number_format_thousands_sep');100 $this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans;101 102 96 // Import global locale vars set during inclusion of $locale.php. 103 97 foreach ( $this->locale_vars as $var ) { 104 98 if ( isset($GLOBALS[$var]) ) 105 99 $this->$var = $GLOBALS[$var]; 106 100 } 107 108 101 } 109 102 110 103 function get_weekday($weekday_number) {