Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CurrencyFormatter.CurrencyFormatter(String, IIterable(String), String) constructor

Creates a CurrencyFormatter object initialized with a currency identifier, language list, and geographic region.

Syntax


var currencyFormatter = new Windows.Globalization.NumberFormatting.CurrencyFormatter(currencyCode, languages, geographicRegion);

Parameters

currencyCode

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The currency identifier to use when formatting and parsing currency values.

languages

Type: IIterable<String> [JavaScript/C++] | System.Collections.Generic.IEnumerable<String> [.NET]

The list of language identifiers, in priority order, representing the choice of languages. See Remarks.

geographicRegion

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The identifier for the geographic region.

Remarks

In the case that the symbol for the provided currency is the same symbol as that of a different currency in the provided region (or the home region if none is provided), formatting may use a currency code even if the Mode property is UseSymbol. This is to avoid ambiguity. For example, CurrencyFormatter("USD", ["en"], "CA") creates a formatter that formats 3 as 3 CAD, even if the Mode property is UseSymbol. Similarly, CurrencyFormatter("CAD", ["en"], "US") creates a formatter that formats 3 as 3 USD.

If your app passes language tags used in this class to any National Language Support functions, it must first convert the tags by calling ResolveLocaleName.

Starting in Windows 8.1: Language tags support the Unicode extensions "ca-" and "nu-". (See Unicode Key/Type Definitions.) Note that the "nu-" extension can affect the numeral system used by CurrencyFormatter objects.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Globalization.NumberFormatting
Windows::Globalization::NumberFormatting [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.Globalization.NumberFormatting
Windows::Globalization::NumberFormatting [C++]

Metadata

Windows.winmd

See also

CurrencyFormatter
CurrencyFormatter(String)
Unicode Key/Type Definitions

 

 

Show: