currency
Set this to override the currency. To request the default currency used by the locale, use Locale.currency
- iOS
- 16+
- macOS
- 13+
- tvOS
- 16+
- watchOS
- 9+
var currency: Locale.Currency?
Corresponds to the “cu” key of the Unicode BCP 47 extension
Set this to override the currency. To request the default currency used by the locale, use Locale.currency
var currency: Locale.Currency?
s20FoundationEssentials6LocaleV10ComponentsV8currencyAC8CurrencyVSgvp
What are these?6JRGP
Corresponds to the “cu” key of the Unicode BCP 47 extension
import FoundationEssentials
struct Components
Represents locale-related attributes. You can use Locale.Components
to create a Locale
with specific overrides.
struct Locale
Locale
encapsulates information about linguistic, cultural, and technological conventions and standards. Examples of information encapsulated by a locale include the symbol used for the decimal separator in numbers and the way dates are formatted.
struct Currency
init(from decoder: any Decoder) throws
init(languageCode: Locale.LanguageCode? = nil, script: Locale.Script? = nil, languageRegion: Locale.Region? = nil)
Creates a Locale.Components
with the specified language code, script and region for the language
var calendar: Calendar.Identifier?
Set this to override the default calendar. To request the default calendar used by the locale, use Locale.calendar
var collation: Locale.Collation?
Set this to override the string sort order. To request the default calendar used by the locale, use Locale.calendar
var firstDayOfWeek: Locale.Weekday?
Set this to override the first day of the week. To request the default first day of the week preferred by the locale, use Locale.firstDayOfWeek
var hourCycle: Locale.HourCycle?
Set this to override the hour cycle. To request the default hour cycle, use Locale.hourCycle
var languageComponents: Locale.Language.Components
Represents the language identifier a locale
var measurementSystem: Locale.MeasurementSystem?
Set this to override the measurement system. To request the default measurement system, use Locale.measurementSystem
var numberingSystem: Locale.NumberingSystem?
Set this to override the numbering system. To request the default numbering system used by the locale, use Locale.numberingSystem
var region: Locale.Region?
Set this to override the region for region-related preferences, such as measuring system, calendar, and first day of the week. If unset, the region of the language component is used
var subdivision: Locale.Subdivision?
Set this to override the regional subdivision of region
var timeZone: TimeZone?
Set this to specify a time zone to associate with this locale
var variant: Locale.Variant?
Set this to specify a variant used for the locale