• Overview
@angular/common

getLocaleCurrencyCode

function
deprecatedsince v4217

Retrieves the default currency code for the given locale.

Deprecation warning

We recommend you create a map of locale to ISO 4217 currency codes. Time relative currency data is provided by the CLDR project. See https://www.unicode.org/cldr/charts/44/supplemental/detailed_territory_currency_information.html

API

function getLocaleCurrencyCode(locale: string): string | null;
@deprecated

We recommend you create a map of locale to ISO 4217 currency codes. Time relative currency data is provided by the CLDR project. See https://www.unicode.org/cldr/charts/44/supplemental/detailed_territory_currency_information.html

@paramlocalestring

The code of the locale whose currency code we want.

@returnsstring | null

The code of the default currency for the given locale.

Description

Retrieves the default currency code for the given locale.

The default is defined as the first currency which is still in use.

Jump to details