GlobalCupertinoLocalizations class Null safety

Implementation of localized strings for Cupertino widgets using the intl package for date and time formatting.

Further localization of strings beyond date time formatting are provided by language specific subclasses of GlobalCupertinoLocalizations.

Supported languages

This class supports locales with the following Locale.languageCodes:

  • af - Afrikaans
  • am - Amharic
  • ar - Arabic
  • as - Assamese
  • az - Azerbaijani
  • be - Belarusian
  • bg - Bulgarian
  • bn - Bengali Bangla
  • bs - Bosnian
  • ca - Catalan Valencian
  • cs - Czech
  • da - Danish
  • de - German (plus one country variation)
  • el - Modern Greek
  • en - English (plus 8 country variations)
  • es - Spanish Castilian (plus 20 country variations)
  • et - Estonian
  • eu - Basque
  • fa - Persian
  • fi - Finnish
  • fil - Filipino Pilipino
  • fr - French (plus one country variation)
  • gl - Galician
  • gsw - Swiss German Alemannic Alsatian
  • gu - Gujarati
  • he - Hebrew
  • hi - Hindi
  • hr - Croatian
  • hu - Hungarian
  • hy - Armenian
  • id - Indonesian
  • is - Icelandic
  • it - Italian
  • ja - Japanese
  • ka - Georgian
  • kk - Kazakh
  • km - Khmer Central Khmer
  • kn - Kannada
  • ko - Korean
  • ky - Kirghiz Kyrgyz
  • lo - Lao
  • lt - Lithuanian
  • lv - Latvian
  • mk - Macedonian
  • ml - Malayalam
  • mn - Mongolian
  • mr - Marathi
  • ms - Malay
  • my - Burmese
  • nb - Norwegian BokmÃ¥l
  • ne - Nepali
  • nl - Dutch Flemish
  • no - Norwegian
  • or - Oriya
  • pa - Panjabi Punjabi
  • pl - Polish
  • pt - Portuguese (plus one country variation)
  • ro - Romanian Moldavian Moldovan
  • ru - Russian
  • si - Sinhala Sinhalese
  • sk - Slovak
  • sl - Slovenian
  • sq - Albanian
  • sr - Serbian (plus 2 scripts)
  • sv - Swedish
  • sw - Swahili
  • ta - Tamil
  • te - Telugu
  • th - Thai
  • tl - Tagalog
  • tr - Turkish
  • uk - Ukrainian
  • ur - Urdu
  • uz - Uzbek
  • vi - Vietnamese
  • zh - Chinese (plus 2 country variations and 2 scripts)
  • zu - Zulu

This list is available programmatically via kCupertinoSupportedLanguages.

Sample code

To include the localizations provided by this class in a CupertinoApp, add GlobalCupertinoLocalizations.delegates to CupertinoApp.localizationsDelegates, and specify the locales your app supports with CupertinoApp.supportedLocales:

CupertinoApp(
  localizationsDelegates: GlobalCupertinoLocalizations.delegates,
  supportedLocales: [
    const Locale('en', 'US'), // American English
    const Locale('he', 'IL'), // Israeli Hebrew
    // ...
  ],
  // ...
)

See also:

Implemented types
Implementers

Constructors

GlobalCupertinoLocalizations({required String localeName, required DateFormat fullYearFormat, required DateFormat dayFormat, required DateFormat mediumDateFormat, required DateFormat singleDigitHourFormat, required DateFormat singleDigitMinuteFormat, required DateFormat doubleDigitMinuteFormat, required DateFormat singleDigitSecondFormat, required NumberFormat decimalFormat})
Initializes an object that defines the Cupertino widgets' localized strings for the given localeName.
const

Properties

alertDialogLabel String
The term used by the system to announce dialog alerts.
read-onlyinherited
anteMeridiemAbbreviation String
The abbreviation for ante meridiem (before noon) shown in the time picker.
read-onlyinherited
copyButtonLabel String
The term used for copying.
read-onlyinherited
cutButtonLabel String
The term used for cutting.
read-onlyinherited
datePickerDateOrder DatePickerDateOrder
The order of the date elements that will be shown in CupertinoDatePicker.
read-onlyoverride
datePickerDateOrderString String
A string describing the DatePickerDateOrder enum value.
protected">@protectedread-only
datePickerDateTimeOrder DatePickerDateTimeOrder
The order of the time elements that will be shown in CupertinoDatePicker.
read-onlyoverride
datePickerDateTimeOrderString String
A string describing the DatePickerDateTimeOrder enum value.
protected">@protectedread-only
datePickerHourSemanticsLabelFew String?
Subclasses should provide the optional few pluralization of datePickerHourSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerHourSemanticsLabelMany String?
Subclasses should provide the optional many pluralization of datePickerHourSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerHourSemanticsLabelOne String?
Subclasses should provide the optional one pluralization of datePickerHourSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerHourSemanticsLabelOther String?
Subclasses should provide the required other pluralization of datePickerHourSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerHourSemanticsLabelTwo String?
Subclasses should provide the optional two pluralization of datePickerHourSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerHourSemanticsLabelZero String?
Subclasses should provide the optional zero pluralization of datePickerHourSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerMinuteSemanticsLabelFew String?
Subclasses should provide the optional few pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerMinuteSemanticsLabelMany String?
Subclasses should provide the optional many pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerMinuteSemanticsLabelOne String?
Subclasses should provide the optional one pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerMinuteSemanticsLabelOther String?
Subclasses should provide the required other pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerMinuteSemanticsLabelTwo String?
Subclasses should provide the optional two pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
protected">@protectedread-only
datePickerMinuteSemanticsLabelZero String?
Subclasses should provide the optional zero pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
protected">@protectedread-only
hashCode int
The hash code for this object.
read-onlyinherited
modalBarrierDismissLabel String
Label read out by accessibility tools (VoiceOver) for a modal barrier to indicate that a tap dismisses the barrier.
read-onlyinherited
pasteButtonLabel String
The term used for pasting.
read-onlyinherited
postMeridiemAbbreviation String
The abbreviation for post meridiem (after noon) shown in the time picker.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
searchTextFieldPlaceholderLabel String
The default placeholder used in CupertinoSearchTextField.
read-onlyinherited
selectAllButtonLabel String
The term used for selecting everything.
read-onlyinherited
tabSemanticsLabelRaw String
The raw version of tabSemanticsLabel, with $tabIndex and $tabCount verbatim in the string.
protected">@protectedread-only
timerPickerHourLabelFew String?
Subclasses should provide the optional few pluralization of timerPickerHourLabel based on the ARB file.
protected">@protectedread-only
timerPickerHourLabelMany String?
Subclasses should provide the optional many pluralization of timerPickerHourLabel based on the ARB file.
protected">@protectedread-only
timerPickerHourLabelOne String?
Subclasses should provide the optional one pluralization of timerPickerHourLabel based on the ARB file.
protected">@protectedread-only
timerPickerHourLabelOther String?
Subclasses should provide the required other pluralization of timerPickerHourLabel based on the ARB file.
protected">@protectedread-only
timerPickerHourLabels List<String>
All possible hour labels that appears next to the hour picker in CupertinoTimerPicker
read-onlyoverride
timerPickerHourLabelTwo String?
Subclasses should provide the optional two pluralization of timerPickerHourLabel based on the ARB file.
protected">@protectedread-only
timerPickerHourLabelZero String?
Subclasses should provide the optional zero pluralization of timerPickerHourLabel based on the ARB file.
protected">@protectedread-only
timerPickerMinuteLabelFew String?
Subclasses should provide the optional few pluralization of timerPickerMinuteLabel based on the ARB file.
protected">@protectedread-only
timerPickerMinuteLabelMany String?
Subclasses should provide the optional many pluralization of timerPickerMinuteLabel based on the ARB file.
protected">@protectedread-only
timerPickerMinuteLabelOne String?
Subclasses should provide the optional one pluralization of timerPickerMinuteLabel based on the ARB file.
protected">@protectedread-only
timerPickerMinuteLabelOther String?
Subclasses should provide the required other pluralization of timerPickerMinuteLabel based on the ARB file.
protected">@protectedread-only
timerPickerMinuteLabels List<String>
All possible minute labels that appears next to the minute picker in CupertinoTimerPicker
read-onlyoverride
timerPickerMinuteLabelTwo String?
Subclasses should provide the optional two pluralization of timerPickerMinuteLabel based on the ARB file.
protected">@protectedread-only
timerPickerMinuteLabelZero String?
Subclasses should provide the optional zero pluralization of timerPickerMinuteLabel based on the ARB file.
protected">@protectedread-only
timerPickerSecondLabelFew String?
Subclasses should provide the optional few pluralization of timerPickerSecondLabel based on the ARB file.
protected">@protectedread-only
timerPickerSecondLabelMany String?
Subclasses should provide the optional many pluralization of timerPickerSecondLabel based on the ARB file.
protected">@protectedread-only
timerPickerSecondLabelOne String?
Subclasses should provide the optional one pluralization of timerPickerSecondLabel based on the ARB file.
protected">@protectedread-only
timerPickerSecondLabelOther String?
Subclasses should provide the required other pluralization of timerPickerSecondLabel based on the ARB file.
protected">@protectedread-only
timerPickerSecondLabels List<String>
All possible second labels that appears next to the second picker in CupertinoTimerPicker
read-onlyoverride
timerPickerSecondLabelTwo String?
Subclasses should provide the optional two pluralization of timerPickerSecondLabel based on the ARB file.
protected">@protectedread-only
timerPickerSecondLabelZero String?
Subclasses should provide the optional zero pluralization of timerPickerSecondLabel based on the ARB file.
protected">@protectedread-only
todayLabel String
Label shown in date pickers when the date is today.
read-onlyinherited

Methods

datePickerDayOfMonth(int dayIndex) String
Day of month that is shown in CupertinoDatePicker spinner corresponding to the given day index.
override
datePickerHour(int hour) String
Hour that is shown in CupertinoDatePicker spinner corresponding to the given hour value.
override
datePickerHourSemanticsLabel(int hour) String?
Semantics label for the given hour value in CupertinoDatePicker.
override
datePickerMediumDate(DateTime date) String
The medium-width date format that is shown in CupertinoDatePicker spinner. Abbreviates month and days of week.
override
datePickerMinute(int minute) String
Minute that is shown in CupertinoDatePicker spinner corresponding to the given minute value.
override
datePickerMinuteSemanticsLabel(int minute) String?
Semantics label for the given minute value in CupertinoDatePicker.
override
datePickerMonth(int monthIndex) String
Month that is shown in CupertinoDatePicker spinner corresponding to the given month index.
override
datePickerYear(int yearIndex) String
Year that is shown in CupertinoDatePicker spinner corresponding to the given year index.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
tabSemanticsLabel({required int tabIndex, required int tabCount}) String
The accessibility label used on a tab in a CupertinoTabBar.
override
timerPickerHour(int hour) String
Hour that is shown in CupertinoTimerPicker corresponding to the given hour value.
override
timerPickerHourLabel(int hour) String?
Label that appears next to the hour picker in CupertinoTimerPicker when selected hour value is hour. This function will deal with pluralization based on the hour parameter.
override
timerPickerMinute(int minute) String
Minute that is shown in CupertinoTimerPicker corresponding to the given minute value.
override
timerPickerMinuteLabel(int minute) String?
Label that appears next to the minute picker in CupertinoTimerPicker when selected minute value is minute. This function will deal with pluralization based on the minute parameter.
override
timerPickerSecond(int second) String
Second that is shown in CupertinoTimerPicker corresponding to the given second value.
override
timerPickerSecondLabel(int second) String?
Label that appears next to the minute picker in CupertinoTimerPicker when selected minute value is second. This function will deal with pluralization based on the second parameter.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

delegate → const LocalizationsDelegate<CupertinoLocalizations>
A LocalizationsDelegate for CupertinoLocalizations.
_GlobalCupertinoLocalizationsDelegate()
delegates → const List<LocalizationsDelegate>
A value for CupertinoApp.localizationsDelegates that's typically used by internationalized apps.
<LocalizationsDelegate<dynamic>>[GlobalCupertinoLocalizations.delegate, GlobalWidgetsLocalizations.delegate]