Numeral​System​Translator Numeral​System​Translator Numeral​System​Translator Class

Definition

Translates digits of the Latin numerical system into digits of another numerical system.

public : sealed class NumeralSystemTranslator : INumeralSystemTranslatorpublic sealed class NumeralSystemTranslator : INumeralSystemTranslatorPublic NotInheritable Class NumeralSystemTranslator Implements INumeralSystemTranslator
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

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.

Constructors

NumeralSystemTranslator() NumeralSystemTranslator() NumeralSystemTranslator()

Creates a NumeralSystemTranslator object initialized by the list of current runtime language values preferred by the user.

public : NumeralSystemTranslator()public NumeralSystemTranslator()Public Sub New()
Attributes

Remarks

This default constructor is equivalent to the use of NumeralSystemTranslator (Windows.Globalization.ApplicationLanguages.languages ).

See Also

NumeralSystemTranslator(IIterable<String>) NumeralSystemTranslator(IIterable<String>) NumeralSystemTranslator(IIterable<String>)

Creates a NumeralSystemTranslator object initialized by a language list.

public : NumeralSystemTranslator(IIterable<PlatForm::String> languages)public NumeralSystemTranslator(IEnumerable<String> languages)Public Sub New(languages As IEnumerable<String>)
Parameters
languages
IIterable<PlatForm::String> IEnumerable<String> IEnumerable<String>

A list of BCP-47 language tags, in priority order, representing the choice of languages. They must all be well-formed according to Windows.Globalization.Language.isWellFormed.

Attributes

Remarks

This constructor creates an object initialized to use the default numeral system of the first language in languages which is known to the system. If none are known, it uses the current runtime language preferred by the user.

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.

See Also

Properties

Languages Languages Languages

Gets the BCP-47 language tag(s) used to initialize this NumeralSystemTranslator object.

public : IVectorView<string> Languages { get; }public IReadOnlyList<string> Languages { get; }Public ReadOnly Property Languages As IReadOnlyList<string>
Value
IVectorView<PlatForm::String> IReadOnlyList<string> IReadOnlyList<string>

The BCP-47 language tag(s) used to initialize this NumeralSystemTranslator object. There is always at least one.

Attributes

Remarks

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.

See Also

NumeralSystem NumeralSystem NumeralSystem

Gets or sets the numeral system that Latin digits will be converted to on calls to TranslateNumerals.

public : PlatForm::String NumeralSystem { get; set; }public string NumeralSystem { get; set; }Public ReadWrite Property NumeralSystem As string
Value
PlatForm::String string string

A string that indicates the target numeral system of the translator, such as "Arab" for the Arabic-Indic numeral system (٠١٢٣٤٥٦٧٨٩). See the supported NumeralSystem values.

Attributes

Remarks

Note

For Arabic numeral systems ("Arab" and "ArabExt" or any numeral systems which use a combination of those characters):+ A period (.) immediately before a Latin digit is converted to the Arabic Decimal Separator (u+66b).

  • A comma (,) immediately before a Latin digit is converted to Arabic Thousand Separator (u+66c).
  • A percent (%) adjacent to a Latin digit is converted to Arabic Per Cent Symbol (u+66a).
  • A permille (u+2030) adjacent to a Latin digit is converted to Arabic Per Mille Symbol (u+609).
See Also

ResolvedLanguage ResolvedLanguage ResolvedLanguage

Gets the language used to determine the numeral system when this object was initialized.

public : PlatForm::String ResolvedLanguage { get; }public string ResolvedLanguage { get; }Public ReadOnly Property ResolvedLanguage As string
Value
PlatForm::String string string

The particular BCP-47 language tag used during the construction of this object to determine the initial value of NumeralSystem.

Attributes

Remarks

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

See Also

Methods

TranslateNumerals(String) TranslateNumerals(String) TranslateNumerals(String)

Converts a string of characters containing Latin digits to a string containing the corresponding digits of NumeralSystem.

public : PlatForm::String TranslateNumerals(PlatForm::String value)public string TranslateNumerals(String value)Public Function TranslateNumerals(value As String) As string
Parameters
value
PlatForm::String String String

A string of characters containing Latin digits to be converted.

Returns
PlatForm::String string string

A string containing the converted digits. This string may be a different length than value.

Attributes

Remarks

Characters in value that are not Latin digits are not converted, but pass through unchanged. If value is null (representing an empty string) the result is null. If NumeralSystem is "Latn", value is passed through unchanged.

Note

For Arabic numeral systems ("Arab" and "ArabExt" or any numeral systems which use a combination of those characters):+ A period (.) immediately before a Latin digit is converted to the Arabic Decimal Separator (u+66b).

  • A comma (,) immediately before a Latin digit is converted to Arabic Thousand Separator (u+66c).
  • A percent (%) adjacent to a Latin digit is converted to Arabic Per Cent Symbol (u+66a).
  • A permille (u+2030) adjacent to a Latin digit is converted to Arabic Per Mille Symbol (u+609).
See Also

See Also