Convert integer number to format based on the locale.

Signature

number_format_i18n( $number, $decimals = 0 )
number
 (int) The number to convert based on locale.
decimals
 (int) Optional. Precision of the number of decimal places. Default 0.
Default: 0

Return

(string) Converted number in string format.

Source

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'] );

	/**
	 * Filter the number formatted based on the locale.
	 *
	 * @since  2.8.0
	 *
	 * @param string $formatted Converted number in string format.
	 */
	return apply_filters( 'number_format_i18n', $formatted );
}
WP Trac GitHub

Link here