var availableNumberingSystems: [Locale.NumberingSystem]
Returns all the valid numbering systems for the locale. For example, "ar-AE (Arabic (United Arab Emirates)"
has both "latn" (Latin digits)
and "arab" (Arabic-Indic digits)
numbering system.
var calendar: Calendar
Returns the calendar for the locale, or the Gregorian calendar as a fallback.
var collation: Locale.Collation
Returns the default collation used by the locale. Default is .standard
.
var currency: Locale.Currency?
Returns the currency of the locale. Returns nil if the data isn’t available.
var currencyCode: String?
Returns the currency code of the locale.
var currencySymbol: String?
Returns the currency symbol of the locale.
var customMirror: Mirror
var debugDescription: String
var description: String
var firstDayOfWeek: Locale.Weekday
Returns the first day of the week of the locale. Returns .sunday
as the default value if the data isn’t available to the requested locale.
var forceHourCycle: Locale.HourCycle?
var forceMeasurementSystem: Locale.MeasurementSystem?
var forceTemperatureUnit: LocalePreferences.TemperatureUnit?
var identifierCapturingPreferences: String
var language: Locale.Language
var languageCode: String?
Returns the language code of the locale, or nil if has none.
var measurementSystem: Locale.MeasurementSystem
var numberingSystem: Locale.NumberingSystem
Returns the numbering system of the locale. If the locale has an explicitly specified numbering system in the identifier (e.g. bn_BD@numbers=latn
) or in the associated Locale.Components
, that numbering system is returned. Otherwise, returns the default numbering system of the locale. Returns "latn"
as the default value if the data isn’t available.
var prefs: LocalePreferences?
var region: Locale.Region?
Returns the region of the locale. For example, “US” for “en_US”, “GB” for “en_GB”, “PT” for “pt_PT”.
var regionCode: String?
Returns the region code of the locale, or nil if it has none.
var scriptCode: String?
Returns the script code of the locale, or nil if has none.
var subdivision: Locale.Subdivision?
Returns the regional subdivision for the locale, or nil if there is none.
var temperatureUnit: LocalePreferences.TemperatureUnit
var timeZone: TimeZone?
var usesMetricSystem: Bool
Returns true if the locale uses the metric system.
var variant: Locale.Variant?
Returns the variant for the locale, or nil if it has none. For example, for the locale “en_POSIX”, returns “POSIX”.
var variantCode: String?
Returns the variant code for the locale, or nil if it has none.
func encode(to: any Encoder) throws
func forceFirstWeekday(Calendar.Identifier) -> Locale.Weekday?
func forceMinDaysInFirstWeek(Calendar.Identifier) -> Int?
func hash(into: inout Hasher)
func identifier(Locale.IdentifierType) -> String
func localizedString(forCurrencyCode: String) -> String?
Returns a localized string for a specified ISO 4217 currency code.
func localizedString(forLanguageCode: String) -> String?
Returns a localized string for a specified language code.
func localizedString(forRegionCode: String) -> String?
Returns a localized string for a specified region code.
func localizedString(forScriptCode: String) -> String?
Returns a localized string for a specified script code.
func localizedString(forVariantCode: String) -> String?
Returns a localized string for a specified variant code.