NumeralSystemTranslator
NumeralSystemTranslator
NumeralSystemTranslator
NumeralSystemTranslator
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// You can use this class in JavaScript.
- Attributes
| 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() 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()// You can use this method in JavaScript.
Remarks
This default constructor is equivalent to the use of NumeralSystemTranslator (Windows.Globalization.ApplicationLanguages.languages ).
- See Also
NumeralSystemTranslator(IIterable)
NumeralSystemTranslator(IIterable)
NumeralSystemTranslator(IIterable)
NumeralSystemTranslator(IIterable)
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>)// You can use this method in JavaScript.
- languages
- IIterable<PlatForm::String> IEnumerable<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.
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 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>// You can use this property in JavaScript.
- Value
- IVectorView<PlatForm::String> IReadOnlyList<string> IReadOnlyList<string> IReadOnlyList<string>
The BCP-47 language tag(s) used to initialize this NumeralSystemTranslator object. There is always at least one.
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 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// You can use this property in JavaScript.
- Value
- PlatForm::String 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.
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 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// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The particular BCP-47 language tag used during the construction of this object to determine the initial value of NumeralSystem.
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) 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// You can use this method in JavaScript.
- value
- PlatForm::String String String String
A string of characters containing Latin digits to be converted.
A string containing the converted digits. This string may be a different length than value.
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