GlobalCupertinoLocalizations class

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
  • el - Modern Greek
  • en - English (plus 7 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
  • 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 programatically 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:

new 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

datePickerDateOrder DatePickerDateOrder
The order of the date elements that will be shown in CupertinoDatePicker.
read-only, override
datePickerDateOrderString String
A string describing the DatePickerDateOrder enum value. [...]
@protected, read-only
datePickerDateTimeOrder DatePickerDateTimeOrder
The order of the time elements that will be shown in CupertinoDatePicker.
read-only, override
datePickerDateTimeOrderString String
A string describing the DatePickerDateTimeOrder enum value. [...]
@protected, read-only
datePickerHourSemanticsLabelFew String
Subclasses should provide the optional few pluralization of datePickerHourSemanticsLabel based on the ARB file.
@protected, read-only
datePickerHourSemanticsLabelMany String
Subclasses should provide the optional many pluralization of datePickerHourSemanticsLabel based on the ARB file.
@protected, read-only
datePickerHourSemanticsLabelOne String
Subclasses should provide the optional one pluralization of datePickerHourSemanticsLabel based on the ARB file.
@protected, read-only
datePickerHourSemanticsLabelOther String
Subclasses should provide the required other pluralization of datePickerHourSemanticsLabel based on the ARB file.
@protected, read-only
datePickerHourSemanticsLabelTwo String
Subclasses should provide the optional two pluralization of datePickerHourSemanticsLabel based on the ARB file.
@protected, read-only
datePickerHourSemanticsLabelZero String
Subclasses should provide the optional zero pluralization of datePickerHourSemanticsLabel based on the ARB file.
@protected, read-only
datePickerMinuteSemanticsLabelFew String
Subclasses should provide the optional few pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
@protected, read-only
datePickerMinuteSemanticsLabelMany String
Subclasses should provide the optional many pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
@protected, read-only
datePickerMinuteSemanticsLabelOne String
Subclasses should provide the optional one pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
@protected, read-only
datePickerMinuteSemanticsLabelOther String
Subclasses should provide the required other pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
@protected, read-only
datePickerMinuteSemanticsLabelTwo String
Subclasses should provide the optional two pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
@protected, read-only
datePickerMinuteSemanticsLabelZero String
Subclasses should provide the optional zero pluralization of datePickerMinuteSemanticsLabel based on the ARB file.
@protected, read-only
timerPickerHourLabelFew String
Subclasses should provide the optional few pluralization of timerPickerHourLabel based on the ARB file.
@protected, read-only
timerPickerHourLabelMany String
Subclasses should provide the optional many pluralization of timerPickerHourLabel based on the ARB file.
@protected, read-only
timerPickerHourLabelOne String
Subclasses should provide the optional one pluralization of timerPickerHourLabel based on the ARB file.
@protected, read-only
timerPickerHourLabelOther String
Subclasses should provide the required other pluralization of timerPickerHourLabel based on the ARB file.
@protected, read-only
timerPickerHourLabelTwo String
Subclasses should provide the optional two pluralization of timerPickerHourLabel based on the ARB file.
@protected, read-only
timerPickerHourLabelZero String
Subclasses should provide the optional zero pluralization of timerPickerHourLabel based on the ARB file.
@protected, read-only
timerPickerMinuteLabelFew String
Subclasses should provide the optional few pluralization of timerPickerMinuteLabel based on the ARB file.
@protected, read-only
timerPickerMinuteLabelMany String
Subclasses should provide the optional many pluralization of timerPickerMinuteLabel based on the ARB file.
@protected, read-only
timerPickerMinuteLabelOne String
Subclasses should provide the optional one pluralization of timerPickerMinuteLabel based on the ARB file.
@protected, read-only
timerPickerMinuteLabelOther String
Subclasses should provide the required other pluralization of timerPickerMinuteLabel based on the ARB file.
@protected, read-only
timerPickerMinuteLabelTwo String
Subclasses should provide the optional two pluralization of timerPickerMinuteLabel based on the ARB file.
@protected, read-only
timerPickerMinuteLabelZero String
Subclasses should provide the optional zero pluralization of timerPickerMinuteLabel based on the ARB file.
@protected, read-only
timerPickerSecondLabelFew String
Subclasses should provide the optional few pluralization of timerPickerSecondLabel based on the ARB file.
@protected, read-only
timerPickerSecondLabelMany String
Subclasses should provide the optional many pluralization of timerPickerSecondLabel based on the ARB file.
@protected, read-only
timerPickerSecondLabelOne String
Subclasses should provide the optional one pluralization of timerPickerSecondLabel based on the ARB file.
@protected, read-only
timerPickerSecondLabelOther String
Subclasses should provide the required other pluralization of timerPickerSecondLabel based on the ARB file.
@protected, read-only
timerPickerSecondLabelTwo String
Subclasses should provide the optional two pluralization of timerPickerSecondLabel based on the ARB file.
@protected, read-only
timerPickerSecondLabelZero String
Subclasses should provide the optional zero pluralization of timerPickerSecondLabel based on the ARB file.
@protected, read-only
alertDialogLabel String
The term used by the system to announce dialog alerts.
read-only, inherited
anteMeridiemAbbreviation String
The abbreviation for ante meridiem (before noon) shown in the time picker.
read-only, inherited
copyButtonLabel String
The term used for copying
read-only, inherited
cutButtonLabel String
The term used for cutting
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
pasteButtonLabel String
The term used for pasting
read-only, inherited
postMeridiemAbbreviation String
The abbreviation for post meridiem (after noon) shown in the time picker.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selectAllButtonLabel String
The term used for selecting everything
read-only, inherited
todayLabel String
Label shown in date pickers when the date is today.
read-only, inherited

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
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
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

delegate → const LocalizationsDelegate<CupertinoLocalizations>
A LocalizationsDelegate that uses GlobalCupertinoLocalizations.load to create an instance of this class. [...]
const _GlobalCupertinoLocalizationsDelegate()
delegates → const List<LocalizationsDelegate>
A value for CupertinoApp.localizationsDelegates that's typically used by internationalized apps. [...]
const <LocalizationsDelegate>[GlobalCupertinoLocalizations.delegate, GlobalWidgetsLocalizations.delegate]