fuchsia.intl

PROTOCOLS

PropertyProvider

Defined in fuchsia.intl/property_provider.fidl

Provides internationalization properties.

Components that need to change their behavior in response to the user's internationalization profile may request an instance of this service from their namespace, if available. A component may choose to pass along the service that it received from its parent to its own children, or to override it and apply additional customizations.

See also fuchsia.ui.views.View.

GetProfile

Gets the user's internationalization profile.

Request

NameType

Response

NameType
profile Profile

OnChange

Indicates that the properties may have changed and the client should query them again.

Response

NameType

STRUCTS

LocaleId

Defined in fuchsia.intl/intl.fidl

Typed identifier for a single Locale, which is a set of internationalization-related properties.

Most APIs that consume locales will probably want to accept a vector of locales to account for priority.

NameTypeDescriptionDefault
id string Unicode BCP-47 Locale Identifier (http://www.unicode.org/reports/tr35/#BCP_47_Conformance). Must be canonicalized and well-formed. This field should not be populated from arbitrary user- or third-party input, but instead generated programmatically. Includes language, region, script, and variant, plus Unicode extensions (under the "u" singleton). Other extensions are allowed but ignored. Examples: "en-US" American English "fr-u-hc-h12" French, with 12-hour clock "ar-EG-u-fw-mon-nu-latn" Egyptian Arabic with "Latin" numerals and first day of week on Monday No default

CalendarId

Defined in fuchsia.intl/intl.fidl

Typed identifier for a single calendar system. Currently consists only of a calendar ID.

NameTypeDescriptionDefault
id string Unicode BCP-47 Locale Identifier with an undefined language tag and a single extension specifying the calendar ID (from https://unicode.org/repos/cldr/trunk/common/bcp47/calendar.xml). Examples: "und-u-ca-gregory" "und-u-ca-islamic" No default

TimeZoneId

Defined in fuchsia.intl/intl.fidl

Typed identifier for a time zone.

NameTypeDescriptionDefault
id string Time zone ID from tzdata, e.g. "America/New_York". See https://www.iana.org/time-zones. No default

ENUMS

TemperatureUnit

Type: uint32

Defined in fuchsia.intl/intl.fidl

Selection of temperature unit.

NameValueDescription
CELSIUS 0
FAHRENHEIT 1

TABLES

RegulatoryDomain

Defined in fuchsia.intl/intl.fidl

Typed identifier for a regulatory domain as specified in the IEEE 802.11 standard.

OrdinalNameTypeDescription
1 country_code string ISO 3166-1 alpha-2, a two-letter code representing a domain of operation. (https://www.iso.org/publication/PUB500001.html)

Profile

Defined in fuchsia.intl/intl.fidl

A collection of ranked internationalization properties.

There is no implied origin for this information; it might come from a user account, device settings, a synthesis of user settings and app-specific overrides, or anywhere else.

Language-independent properties that are supported by Unicode BCP-47 Locale IDs (e.g. first-day-of-week, time zone) are denormalized into the locale IDs in locales.

OrdinalNameTypeDescription
1 locales vector<LocaleId> Ranked list of locales (in descending order).
2 calendars vector<CalendarId> Ranked list of calendars (in descending order). The first entry is the primary calendar, and will be equal to the calendar indicated in `locales`. The list is intended for use by applications that can display multiple calendar systems.
3 time_zones vector<TimeZoneId> Ranked list of time zones (in descending order). The first entry is the primary time zone, which should be used by default for formatting dates and times; it will be equal to the calendar indicated in `locales`. The list is intended for use by applications that can display multiple time zones, e.g. a world clock.
4 temperature_unit TemperatureUnit Selected temperature unit.