Contents

availableNumberingSystems

An array containing all the valid numbering systems for the locale.

Declaration

var availableNumberingSystems: [Locale.NumberingSystem] { get }

Discussion

The following snippet creates a locale for Arabic as used in United Arab Emirites. For this locale, there are two numbering systems available: latn (Latin digits) and arab (Arabic-Indic digits).

let uae = Locale(identifier: "ar-AE") // Arabic / U.A.E.
let numberingSystems = uae.availableNumberingSystems
print("\(numberingSystems.map{$0.identifier})") // ["latn","arab"]

See Also

Getting measurement and counting components