• Home
Name
Date
Size
#Lines
LOC

..--

README.mdD12-May-20248.8 KiB225167

cupertino_af.arbD12-May-2024799 2322

cupertino_am.arbD12-May-2024890 2322

cupertino_ar.arbD12-May-20241.9 KiB4342

cupertino_as.arbD12-May-20241.1 KiB2322

cupertino_az.arbD12-May-2024830 2322

cupertino_be.arbD12-May-20241.5 KiB3332

cupertino_bg.arbD12-May-2024900 2322

cupertino_bn.arbD12-May-20241 KiB2322

cupertino_bs.arbD12-May-20241 KiB2827

cupertino_ca.arbD12-May-2024806 2322

cupertino_cs.arbD12-May-20241.2 KiB3332

cupertino_da.arbD12-May-2024814 2322

cupertino_de.arbD12-May-2024826 2322

cupertino_el.arbD12-May-2024925 2322

cupertino_en.arbD12-May-20244 KiB8772

cupertino_en_AU.arbD12-May-2024800 2322

cupertino_en_CA.arbD12-May-2024800 2322

cupertino_en_GB.arbD12-May-2024800 2322

cupertino_en_IE.arbD12-May-2024800 2322

cupertino_en_IN.arbD12-May-2024800 2322

cupertino_en_SG.arbD12-May-2024800 2322

cupertino_en_ZA.arbD12-May-2024800 2322

cupertino_es.arbD12-May-2024810 2322

cupertino_es_419.arbD12-May-2024813 2322

cupertino_es_AR.arbD12-May-2024813 2322

cupertino_es_BO.arbD12-May-2024813 2322

cupertino_es_CL.arbD12-May-2024813 2322

cupertino_es_CO.arbD12-May-2024813 2322

cupertino_es_CR.arbD12-May-2024813 2322

cupertino_es_DO.arbD12-May-2024813 2322

cupertino_es_EC.arbD12-May-2024813 2322

cupertino_es_GT.arbD12-May-2024813 2322

cupertino_es_HN.arbD12-May-2024813 2322

cupertino_es_MX.arbD12-May-2024813 2322

cupertino_es_NI.arbD12-May-2024813 2322

cupertino_es_PA.arbD12-May-2024813 2322

cupertino_es_PE.arbD12-May-2024813 2322

cupertino_es_PR.arbD12-May-2024813 2322

cupertino_es_PY.arbD12-May-2024813 2322

cupertino_es_SV.arbD12-May-2024813 2322

cupertino_es_US.arbD12-May-2024813 2322

cupertino_es_UY.arbD12-May-2024813 2322

cupertino_es_VE.arbD12-May-2024813 2322

cupertino_et.arbD12-May-2024797 2322

cupertino_eu.arbD12-May-2024806 2322

cupertino_fa.arbD12-May-2024887 2322

cupertino_fi.arbD12-May-2024810 2322

cupertino_fil.arbD12-May-2024815 2322

cupertino_fr.arbD12-May-2024816 2322

cupertino_fr_CA.arbD12-May-2024816 2322

cupertino_gl.arbD12-May-2024811 2322

cupertino_gsw.arbD12-May-2024826 2322

cupertino_gu.arbD12-May-20241,001 2322

cupertino_he.arbD12-May-20241.3 KiB3332

cupertino_hi.arbD12-May-2024943 2322

cupertino_hr.arbD12-May-20241 KiB2827

cupertino_hu.arbD12-May-2024818 2322

cupertino_hy.arbD12-May-2024867 2322

cupertino_id.arbD12-May-2024804 2322

cupertino_is.arbD12-May-2024836 2322

cupertino_it.arbD12-May-2024809 2322

cupertino_ja.arbD12-May-2024808 2322

cupertino_ka.arbD12-May-2024963 2322

cupertino_kk.arbD12-May-2024917 2322

cupertino_km.arbD12-May-2024992 2322

cupertino_kn.arbD12-May-20241.6 KiB2322

cupertino_ko.arbD12-May-2024822 2322

cupertino_ky.arbD12-May-2024923 2322

cupertino_lo.arbD12-May-20241,001 2322

cupertino_lt.arbD12-May-20241.2 KiB3332

cupertino_lv.arbD12-May-20241 KiB2827

cupertino_mk.arbD12-May-2024934 2322

cupertino_ml.arbD12-May-20241.1 KiB2322

cupertino_mn.arbD12-May-2024925 2322

cupertino_mr.arbD12-May-2024942 2322

cupertino_ms.arbD12-May-2024805 2322

cupertino_my.arbD12-May-20241 KiB2322

cupertino_nb.arbD12-May-2024815 2322

cupertino_ne.arbD12-May-20241.1 KiB2322

cupertino_nl.arbD12-May-2024810 2322

cupertino_or.arbD12-May-20241 KiB2322

cupertino_pa.arbD12-May-2024940 2322

cupertino_pl.arbD12-May-20241.2 KiB3332

cupertino_pt.arbD12-May-2024797 2322

cupertino_pt_PT.arbD12-May-2024800 2322

cupertino_ro.arbD12-May-20241 KiB2827

cupertino_ru.arbD12-May-20241.4 KiB3332

cupertino_si.arbD12-May-2024978 2322

cupertino_sk.arbD12-May-20241.3 KiB3332

cupertino_sl.arbD12-May-20241.2 KiB3332

cupertino_sq.arbD12-May-2024817 2322

cupertino_sr.arbD12-May-20241.1 KiB2827

cupertino_sr_Latn.arbD12-May-20241 KiB2827

cupertino_sv.arbD12-May-2024815 2322

cupertino_sw.arbD12-May-2024814 2322

cupertino_ta.arbD12-May-20241 KiB2322

cupertino_te.arbD12-May-20241 KiB2322

cupertino_th.arbD12-May-20241,004 2322

cupertino_tl.arbD12-May-2024815 2322

cupertino_tr.arbD12-May-2024806 2322

cupertino_uk.arbD12-May-20241.4 KiB3332

cupertino_ur.arbD12-May-2024889 2322

cupertino_uz.arbD12-May-2024833 2322

cupertino_vi.arbD12-May-2024829 2322

cupertino_zh.arbD12-May-2024808 2322

cupertino_zh_HK.arbD12-May-2024796 2322

cupertino_zh_TW.arbD12-May-2024796 2322

cupertino_zu.arbD12-May-2024859 2322

generated_cupertino_localizations.dartD12-May-2024384.7 KiB13,2469,905

generated_date_localizations.dartD12-May-2024462.5 KiB20,37920,375

generated_material_localizations.dartD12-May-2024523.4 KiB18,71313,418

material_af.arbD12-May-20242.1 KiB5554

material_am.arbD12-May-20242.5 KiB5554

material_ar.arbD12-May-20243.2 KiB6362

material_as.arbD12-May-20243.4 KiB5554

material_az.arbD12-May-20242.2 KiB5554

material_be.arbD12-May-20243.2 KiB5958

material_bg.arbD12-May-20242.9 KiB5655

material_bn.arbD12-May-20243.3 KiB5554

material_bs.arbD12-May-20242.5 KiB5857

material_ca.arbD12-May-20242.3 KiB5655

material_cs.arbD12-May-20242.6 KiB6059

material_da.arbD12-May-20242.1 KiB5655

material_de.arbD12-May-20242.4 KiB5756

material_de_CH.arbD12-May-20242.3 KiB5655

material_el.arbD12-May-20242.9 KiB5655

material_en.arbD12-May-202411.2 KiB264214

material_en_AU.arbD12-May-20242.1 KiB5655

material_en_CA.arbD12-May-20242.1 KiB5655

material_en_GB.arbD12-May-20242.1 KiB5655

material_en_IE.arbD12-May-20242.1 KiB5655

material_en_IN.arbD12-May-20242.1 KiB5655

material_en_SG.arbD12-May-20242.1 KiB5655

material_en_ZA.arbD12-May-20242.1 KiB5655

material_es.arbD12-May-20242.4 KiB5756

material_es_419.arbD12-May-20242.3 KiB5655

material_es_AR.arbD12-May-20242.3 KiB5655

material_es_BO.arbD12-May-20242.3 KiB5655

material_es_CL.arbD12-May-20242.3 KiB5655

material_es_CO.arbD12-May-20242.3 KiB5655

material_es_CR.arbD12-May-20242.3 KiB5655

material_es_DO.arbD12-May-20242.3 KiB5655

material_es_EC.arbD12-May-20242.3 KiB5655

material_es_GT.arbD12-May-20242.3 KiB5655

material_es_HN.arbD12-May-20242.3 KiB5655

material_es_MX.arbD12-May-20242.3 KiB5655

material_es_NI.arbD12-May-20242.3 KiB5655

material_es_PA.arbD12-May-20242.3 KiB5655

material_es_PE.arbD12-May-20242.3 KiB5655

material_es_PR.arbD12-May-20242.3 KiB5655

material_es_PY.arbD12-May-20242.3 KiB5655

material_es_SV.arbD12-May-20242.3 KiB5655

material_es_US.arbD12-May-20242.3 KiB5655

material_es_UY.arbD12-May-20242.3 KiB5655

material_es_VE.arbD12-May-20242.3 KiB5655

material_et.arbD12-May-20242.2 KiB5655

material_eu.arbD12-May-20242.2 KiB5554

material_fa.arbD12-May-20242.5 KiB5655

material_fi.arbD12-May-20242.2 KiB5655

material_fil.arbD12-May-20242.3 KiB5655

material_fr.arbD12-May-20242.4 KiB5756

material_fr_CA.arbD12-May-20242.3 KiB5554

material_gl.arbD12-May-20242.3 KiB5756

material_gsw.arbD12-May-20242.3 KiB5655

material_gu.arbD12-May-20242.9 KiB5554

material_he.arbD12-May-20242.8 KiB6059

material_hi.arbD12-May-20243.2 KiB5655

material_hr.arbD12-May-20242.5 KiB5857

material_hu.arbD12-May-20242.3 KiB5655

material_hy.arbD12-May-20243.1 KiB6160

material_id.arbD12-May-20242.2 KiB5655

material_is.arbD12-May-20242.1 KiB5554

material_it.arbD12-May-20242.2 KiB5655

material_ja.arbD12-May-20242.4 KiB5655

material_ka.arbD12-May-20243.2 KiB5554

material_kk.arbD12-May-20242.8 KiB5756

material_km.arbD12-May-20243.2 KiB5655

material_kn.arbD12-May-20245.8 KiB5554

material_ko.arbD12-May-20242.2 KiB5655

material_ky.arbD12-May-20242.8 KiB5554

material_lo.arbD12-May-20242.9 KiB5554

material_lt.arbD12-May-20242.6 KiB6059

material_lv.arbD12-May-20242.4 KiB5756

material_mk.arbD12-May-20242.8 KiB5554

material_ml.arbD12-May-20243.5 KiB5554

material_mn.arbD12-May-20242.7 KiB5756

material_mr.arbD12-May-20243.1 KiB5756

material_ms.arbD12-May-20242.2 KiB5756

material_my.arbD12-May-20243.4 KiB5554

material_nb.arbD12-May-20242.1 KiB5655

material_ne.arbD12-May-20243.6 KiB5554

material_nl.arbD12-May-20242.3 KiB5655

material_or.arbD12-May-20243.3 KiB5554

material_pa.arbD12-May-20242.9 KiB5554

material_pl.arbD12-May-20242.5 KiB6059

material_ps.arbD12-May-20242.3 KiB5554

material_pt.arbD12-May-20242.5 KiB5857

material_pt_PT.arbD12-May-20242.2 KiB5655

material_ro.arbD12-May-20242.5 KiB5958

material_ru.arbD12-May-20243.2 KiB6160

material_si.arbD12-May-20243 KiB5554

material_sk.arbD12-May-20242.6 KiB6059

material_sl.arbD12-May-20242.5 KiB6059

material_sq.arbD12-May-20242.2 KiB5554

material_sr.arbD12-May-20243 KiB5857

material_sr_Latn.arbD12-May-20242.4 KiB5857

material_sv.arbD12-May-20242.2 KiB5655

material_sw.arbD12-May-20242.3 KiB5756

material_ta.arbD12-May-20243.8 KiB5756

material_te.arbD12-May-20243.3 KiB5554

material_th.arbD12-May-20242.9 KiB5655

material_tl.arbD12-May-20242.3 KiB5655

material_tr.arbD12-May-20242.2 KiB5655

material_uk.arbD12-May-20243.2 KiB6059

material_ur.arbD12-May-20242.7 KiB5655

material_uz.arbD12-May-20242.3 KiB5554

material_vi.arbD12-May-20242.4 KiB5655

material_zh.arbD12-May-20242.1 KiB5655

material_zh_HK.arbD12-May-20242.2 KiB5655

material_zh_TW.arbD12-May-20242.2 KiB5655

material_zu.arbD12-May-20242.2 KiB5554

README.md

1# Material and Cupertino Libraries Localizations
2
3The `.arb` files in this directory contain localized values (primarily
4strings) used by the Material and Cupertino libraries.  The
5`generated_material_localizations.dart` and
6`generated_cupertino_localizations.dart` files combine all of the
7localizations into a single Map that is linked with the rest of
8flutter_localizations package.
9
10If you're looking for information about internationalizing Flutter
11apps in general, see the
12[Internationalizing Flutter Apps](https://flutter.dev/tutorials/internationalization/) tutorial.
13
14
15### Translations for one locale: .arb files
16
17The Material and Cupertino libraries use
18[Application Resource Bundle](https://code.google.com/p/arb/wiki/ApplicationResourceBundleSpecification)
19files, which have a `.arb` extension, to store localized translations
20of messages, format strings, and other values. This format is also
21used by the Dart [intl](https://pub.dev/packages/intl)
22package and it is supported by the
23[Google Translators Toolkit](https://translate.google.com/toolkit).
24
25The Material and Cupertino libraries only depend on a small subset
26of the ARB format. Each .arb file contains a single JSON table that
27maps from resource IDs to localized values.
28
29Filenames contain the locale that the values have been translated
30for. For example `material_de.arb` contains German translations, and
31`material_ar.arb` contains Arabic translations. Files that contain
32regional translations have names that include the locale's regional
33suffix. For example `material_en_GB.arb` contains additional English
34translations that are specific to Great Britain.
35
36There is one language-specific .arb file for each supported locale. If
37an additional file with a regional suffix is present, the regional
38localizations are automatically merged with the language-specific ones.
39
40The JSON table's keys, called resource IDs, are valid Dart variable
41names. They correspond to methods from the `MaterialLocalizations` or
42`CupertinoLocalizations` classes. For example:
43
44```dart
45Widget build(BuildContext context) {
46  return FlatButton(
47    child: Text(
48      MaterialLocalizations.of(context).cancelButtonLabel,
49    ),
50  );
51}
52```
53
54This widget build method creates a button whose label is the local
55translation of "CANCEL" which is defined for the `cancelButtonLabel`
56resource ID.
57
58Each of the language-specific .arb files contains an entry for
59`cancelButtonLabel`. They're all represented by the `Map` in the
60generated `localizations.dart` file. The Map is used by the
61MaterialLocalizations class.
62
63
64### material_en.arb and cupertino_en.arb Define all of the resource IDs
65
66All of the `material_*.arb` files whose names do not include a regional
67suffix contain translations for the same set of resource IDs as
68`material_en.arb`.
69
70Similarly all of the `cupertino_*.arb` files whose names do not include
71a regional suffix contain translations for the same set of resource IDs
72as `cupertino_en.arb`.
73
74For each resource ID defined for English, there is an additional resource
75with an '@' prefix. These '@' resources are not used by the generated
76Dart code at run time, they just exist to inform translators about how
77the value will be used, and to inform the code generator about what code
78to write.
79
80```dart
81"cancelButtonLabel": "CANCEL",
82"@cancelButtonLabel": {
83  "description": "The label for cancel buttons and menu items.",
84  "type": "text"
85},
86```
87
88
89### Values with Parameters, Plurals
90
91A few of material translations contain `$variable` tokens. The
92Material and Cupertino libraries replace these tokens with values at
93run-time. For example:
94
95```dart
96"aboutListTileTitle": "About $applicationName",
97```
98
99The value for this resource ID is retrieved with a parameterized
100method instead of a simple getter:
101
102```dart
103MaterialLocalizations.of(context).aboutListTileTitle(yourAppTitle)
104```
105
106The names of the `$variable` tokens must match the names of the
107`MaterialLocalizations` method parameters.
108
109
110Plurals are handled similarly, with a lookup method that includes a
111quantity parameter. For example `selectedRowCountTitle` returns a
112string like "1 item selected" or "no items selected".
113
114```dart
115MaterialLocalizations.of(context).selectedRowCountTitle(yourRowCount)
116```
117
118Plural translations can be provided for several quantities: 0, 1, 2,
119"few", "many", "other". The variations are identified by a resource ID
120suffix which must be one of "Zero", "One", "Two", "Few", "Many",
121"Other". The "Other" variation is used when none of the other
122quantities apply. All plural resources must include a resource with
123the "Other" suffix. For example the English translations
124('material_en.arb') for `selectedRowCountTitle` are:
125
126```dart
127"selectedRowCountTitleZero": "No items selected",
128"selectedRowCountTitleOne": "1 item selected",
129"selectedRowCountTitleOther": "$selectedRowCount items selected",
130```
131
132When defining new resources that handle pluralizations, the "One" and
133the "Other" forms must, at minimum, always be defined in the source
134English ARB files.
135
136### scriptCategory and timeOfDayFormat for Material library
137
138In `material_en.arb`, the values of these resource IDs are not
139translations, they're keywords that help define an app's text theme
140and time picker layout respectively.
141
142The value of `timeOfDayFormat` defines how a time picker displayed by
143[showTimePicker()](https://docs.flutter.io/flutter/material/showTimePicker.html)
144formats and lays out its time controls. The value of `timeOfDayFormat`
145must be a string that matches one of the formats defined by
146<https://docs.flutter.io/flutter/material/TimeOfDayFormat-class.html>.
147It is converted to an enum value because the `material_en.arb` file
148has this value labeled as `"x-flutter-type": "icuShortTimePattern"`.
149
150The value of `scriptCategory` is based on the
151[Language categories reference](https://material.io/design/typography/language-support.html#language-categories-reference)
152section in the Material spec. The Material theme uses the
153`scriptCategory` value to lookup a localized version of the default
154`TextTheme`, see
155[Typography.geometryThemeFor](https://docs.flutter.io/flutter/material/Typography/geometryThemeFor.html).
156
157
158### 'generated_*_localizations.dart': all of the localizations as a Map
159
160If you look at the comment at the top of the `generated_material_localizations.dart`
161and `generated_cupertino_localizations.dart` files, you'll
162see that it was manually generated using a `dev/tools/localizations`
163app called `gen_localizations`.
164
165You can see what that script would generate by running this command:
166
167```dart
168dart dev/tools/localizations/gen_localizations.dart packages/flutter_localizations/lib/src/l10n material
169```
170
171The gen_localizations app just combines the contents of all of the
172.arb files into a single `Map` per library that has entries for each .arb
173file's locale. The `MaterialLocalizations` and `CupertinoLocalizations`
174class implementations use these Maps to implement the methods that lookup localized resource values.
175
176The gen_localizations app must be run by hand after .arb files have
177been updated. The app's first parameter is the path to this directory,
178the second is the file name prefix (the file name less the locale
179suffix) for the .arb files in this directory.
180
181To in-place update the generated localizations file using the default
182values, you can just run:
183
184```dart
185dart dev/tools/localizations/gen_localizations.dart --overwrite
186```
187
188
189### Special handling for the Kannada (kn) translations
190
191Originally, the cupertino_kn.arb and material_kn.arb files contained unicode
192characters that can cause current versions of Emacs on Linux to crash. There is
193more information here: https://github.com/flutter/flutter/issues/36704.
194
195Rather than risking developers' editor sessions, the strings in these arb files
196(and the code generated for them) have been encoded using the appropriate
197escapes for JSON and Dart. The JSON format arb files were rewritten with
198dev/tools/localization/encode_kn_arb_files.dart. The localizations code
199generator uses generateEncodedString() from dev/tools/localization/localizations_utils.
200
201
202### Translations Status, Reporting Errors
203
204The translations (the `.arb` files) in this directory are based on the
205English translations in `material_en.arb` and `cupertino_en.arb`.
206Google contributes translations for all the languages supported by
207this package. (Googlers, for more details see <go/flutter-l10n>.)
208
209If you have feedback about the translations please
210[file an issue on the Flutter github repo](https://github.com/flutter/flutter/issues/new?template=BUG.md).
211
212
213### See Also
214
215The [Internationalizing Flutter Apps](https://flutter.dev/tutorials/internationalization/)
216tutorial describes how to use the internationalization APIs in an
217ordinary Flutter app.
218
219[Application Resource Bundle](https://code.google.com/p/arb/wiki/ApplicationResourceBundleSpecification)
220covers the `.arb` file format used to store localized translations
221of messages, format strings, and other values.
222
223The Dart [intl](https://pub.dev/packages/intl)
224package supports internationalization.
225