Advertisements

number_format_i18n

Definition:
function number_format_i18n( $number, $decimals = 0 ) {}

Convert integer number to format based on the locale.

Parameters

  • int $number: The number to convert based on locale.
  • int $decimals: Precision of the number of decimal places.

Return values

returns:Converted number in string format.

Defined filters

  • number_format_i18n
    apply_filters( 'number_format_i18n', $formatted )

Source code

function number_format_i18n( $number, $decimals = 0 ) {

	global $wp_locale;

	$formatted = number_format( $number, absint( $decimals ), $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep'] );

	return apply_filters( 'number_format_i18n', $formatted );

}

2465

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: