system/View/Filters.php
public static function local_number($value, string $type = 'decimal', int $precision = 4, string $locale = null): string
	{
		helper('number');

		$types = [
			'decimal'    => NumberFormatter::DECIMAL,
			'currency'   => NumberFormatter::CURRENCY,
			'percent'    => NumberFormatter::PERCENT,
			'scientific' => NumberFormatter::SCIENTIFIC,
			'spellout'   => NumberFormatter::SPELLOUT,
			'ordinal'    => NumberFormatter::ORDINAL,
			'duration'   => NumberFormatter::DURATION,
		];

		return format_number($value, $precision, $locale, ['type' => $types[$type]]);
	}
public static function local_number($value, string $type = 'decimal', int $precision = 4, string $locale = null): string
	{
		helper('number');

		$types = [
			'decimal'    => NumberFormatter::DECIMAL,
			'currency'   => NumberFormatter::CURRENCY,
			'percent'    => NumberFormatter::PERCENT,
			'scientific' => NumberFormatter::SCIENTIFIC,
			'spellout'   => NumberFormatter::SPELLOUT,
			'ordinal'    => NumberFormatter::ORDINAL,
			'duration'   => NumberFormatter::DURATION,
		];

		return format_number($value, $precision, $locale, ['type' => $types[$type]]);
	}
Returns the $value displayed in a localized manner.

@param $value
@param integer     $precision
@param string      $type
@param string|null $locale

@return string