tree: 29c7b8196e638c2021482970d5858f6f79b7d31f [path history] [tgz]
  1. cupertino_af.arb
  2. cupertino_am.arb
  3. cupertino_ar.arb
  4. cupertino_as.arb
  5. cupertino_az.arb
  6. cupertino_be.arb
  7. cupertino_bg.arb
  8. cupertino_bn.arb
  9. cupertino_bs.arb
  10. cupertino_ca.arb
  11. cupertino_cs.arb
  12. cupertino_cy.arb
  13. cupertino_da.arb
  14. cupertino_de.arb
  15. cupertino_de_CH.arb
  16. cupertino_el.arb
  17. cupertino_en.arb
  18. cupertino_en_AU.arb
  19. cupertino_en_CA.arb
  20. cupertino_en_GB.arb
  21. cupertino_en_IE.arb
  22. cupertino_en_IN.arb
  23. cupertino_en_NZ.arb
  24. cupertino_en_SG.arb
  25. cupertino_en_ZA.arb
  26. cupertino_es.arb
  27. cupertino_es_419.arb
  28. cupertino_es_AR.arb
  29. cupertino_es_BO.arb
  30. cupertino_es_CL.arb
  31. cupertino_es_CO.arb
  32. cupertino_es_CR.arb
  33. cupertino_es_DO.arb
  34. cupertino_es_EC.arb
  35. cupertino_es_GT.arb
  36. cupertino_es_HN.arb
  37. cupertino_es_MX.arb
  38. cupertino_es_NI.arb
  39. cupertino_es_PA.arb
  40. cupertino_es_PE.arb
  41. cupertino_es_PR.arb
  42. cupertino_es_PY.arb
  43. cupertino_es_SV.arb
  44. cupertino_es_US.arb
  45. cupertino_es_UY.arb
  46. cupertino_es_VE.arb
  47. cupertino_et.arb
  48. cupertino_eu.arb
  49. cupertino_fa.arb
  50. cupertino_fi.arb
  51. cupertino_fil.arb
  52. cupertino_fr.arb
  53. cupertino_fr_CA.arb
  54. cupertino_gl.arb
  55. cupertino_gsw.arb
  56. cupertino_gu.arb
  57. cupertino_he.arb
  58. cupertino_hi.arb
  59. cupertino_hr.arb
  60. cupertino_hu.arb
  61. cupertino_hy.arb
  62. cupertino_id.arb
  63. cupertino_is.arb
  64. cupertino_it.arb
  65. cupertino_ja.arb
  66. cupertino_ka.arb
  67. cupertino_kk.arb
  68. cupertino_km.arb
  69. cupertino_kn.arb
  70. cupertino_ko.arb
  71. cupertino_ky.arb
  72. cupertino_lo.arb
  73. cupertino_lt.arb
  74. cupertino_lv.arb
  75. cupertino_mk.arb
  76. cupertino_ml.arb
  77. cupertino_mn.arb
  78. cupertino_mr.arb
  79. cupertino_ms.arb
  80. cupertino_my.arb
  81. cupertino_nb.arb
  82. cupertino_ne.arb
  83. cupertino_nl.arb
  84. cupertino_no.arb
  85. cupertino_or.arb
  86. cupertino_pa.arb
  87. cupertino_pl.arb
  88. cupertino_pt.arb
  89. cupertino_pt_PT.arb
  90. cupertino_ro.arb
  91. cupertino_ru.arb
  92. cupertino_si.arb
  93. cupertino_sk.arb
  94. cupertino_sl.arb
  95. cupertino_sq.arb
  96. cupertino_sr.arb
  97. cupertino_sr_Latn.arb
  98. cupertino_sv.arb
  99. cupertino_sw.arb
  100. cupertino_ta.arb
  101. cupertino_te.arb
  102. cupertino_th.arb
  103. cupertino_tl.arb
  104. cupertino_tr.arb
  105. cupertino_uk.arb
  106. cupertino_ur.arb
  107. cupertino_uz.arb
  108. cupertino_vi.arb
  109. cupertino_zh.arb
  110. cupertino_zh_HK.arb
  111. cupertino_zh_TW.arb
  112. cupertino_zu.arb
  113. generated_cupertino_localizations.dart
  114. generated_date_localizations.dart
  115. generated_material_localizations.dart
  116. generated_widgets_localizations.dart
  117. material_af.arb
  118. material_am.arb
  119. material_ar.arb
  120. material_as.arb
  121. material_az.arb
  122. material_be.arb
  123. material_bg.arb
  124. material_bn.arb
  125. material_bs.arb
  126. material_ca.arb
  127. material_cs.arb
  128. material_cy.arb
  129. material_da.arb
  130. material_de.arb
  131. material_de_CH.arb
  132. material_el.arb
  133. material_en.arb
  134. material_en_AU.arb
  135. material_en_CA.arb
  136. material_en_GB.arb
  137. material_en_IE.arb
  138. material_en_IN.arb
  139. material_en_NZ.arb
  140. material_en_SG.arb
  141. material_en_ZA.arb
  142. material_es.arb
  143. material_es_419.arb
  144. material_es_AR.arb
  145. material_es_BO.arb
  146. material_es_CL.arb
  147. material_es_CO.arb
  148. material_es_CR.arb
  149. material_es_DO.arb
  150. material_es_EC.arb
  151. material_es_GT.arb
  152. material_es_HN.arb
  153. material_es_MX.arb
  154. material_es_NI.arb
  155. material_es_PA.arb
  156. material_es_PE.arb
  157. material_es_PR.arb
  158. material_es_PY.arb
  159. material_es_SV.arb
  160. material_es_US.arb
  161. material_es_UY.arb
  162. material_es_VE.arb
  163. material_et.arb
  164. material_eu.arb
  165. material_fa.arb
  166. material_fi.arb
  167. material_fil.arb
  168. material_fr.arb
  169. material_fr_CA.arb
  170. material_gl.arb
  171. material_gsw.arb
  172. material_gu.arb
  173. material_he.arb
  174. material_hi.arb
  175. material_hr.arb
  176. material_hu.arb
  177. material_hy.arb
  178. material_id.arb
  179. material_is.arb
  180. material_it.arb
  181. material_ja.arb
  182. material_ka.arb
  183. material_kk.arb
  184. material_km.arb
  185. material_kn.arb
  186. material_ko.arb
  187. material_ky.arb
  188. material_lo.arb
  189. material_lt.arb
  190. material_lv.arb
  191. material_mk.arb
  192. material_ml.arb
  193. material_mn.arb
  194. material_mr.arb
  195. material_ms.arb
  196. material_my.arb
  197. material_nb.arb
  198. material_ne.arb
  199. material_nl.arb
  200. material_no.arb
  201. material_or.arb
  202. material_pa.arb
  203. material_pl.arb
  204. material_ps.arb
  205. material_pt.arb
  206. material_pt_PT.arb
  207. material_ro.arb
  208. material_ru.arb
  209. material_si.arb
  210. material_sk.arb
  211. material_sl.arb
  212. material_sq.arb
  213. material_sr.arb
  214. material_sr_Latn.arb
  215. material_sv.arb
  216. material_sw.arb
  217. material_ta.arb
  218. material_te.arb
  219. material_th.arb
  220. material_tl.arb
  221. material_tr.arb
  222. material_uk.arb
  223. material_ur.arb
  224. material_uz.arb
  225. material_vi.arb
  226. material_zh.arb
  227. material_zh_HK.arb
  228. material_zh_TW.arb
  229. material_zu.arb
  230. README.md
  231. widgets_af.arb
  232. widgets_am.arb
  233. widgets_ar.arb
  234. widgets_as.arb
  235. widgets_az.arb
  236. widgets_be.arb
  237. widgets_bg.arb
  238. widgets_bn.arb
  239. widgets_bs.arb
  240. widgets_ca.arb
  241. widgets_cs.arb
  242. widgets_cy.arb
  243. widgets_da.arb
  244. widgets_de.arb
  245. widgets_de_CH.arb
  246. widgets_el.arb
  247. widgets_en.arb
  248. widgets_en_AU.arb
  249. widgets_en_CA.arb
  250. widgets_en_GB.arb
  251. widgets_en_IE.arb
  252. widgets_en_IN.arb
  253. widgets_en_NZ.arb
  254. widgets_en_SG.arb
  255. widgets_en_ZA.arb
  256. widgets_es.arb
  257. widgets_es_419.arb
  258. widgets_es_AR.arb
  259. widgets_es_BO.arb
  260. widgets_es_CL.arb
  261. widgets_es_CO.arb
  262. widgets_es_CR.arb
  263. widgets_es_DO.arb
  264. widgets_es_EC.arb
  265. widgets_es_GT.arb
  266. widgets_es_HN.arb
  267. widgets_es_MX.arb
  268. widgets_es_NI.arb
  269. widgets_es_PA.arb
  270. widgets_es_PE.arb
  271. widgets_es_PR.arb
  272. widgets_es_PY.arb
  273. widgets_es_SV.arb
  274. widgets_es_US.arb
  275. widgets_es_UY.arb
  276. widgets_es_VE.arb
  277. widgets_et.arb
  278. widgets_eu.arb
  279. widgets_fa.arb
  280. widgets_fi.arb
  281. widgets_fil.arb
  282. widgets_fr.arb
  283. widgets_fr_CA.arb
  284. widgets_gl.arb
  285. widgets_gsw.arb
  286. widgets_gu.arb
  287. widgets_he.arb
  288. widgets_hi.arb
  289. widgets_hr.arb
  290. widgets_hu.arb
  291. widgets_hy.arb
  292. widgets_id.arb
  293. widgets_is.arb
  294. widgets_it.arb
  295. widgets_ja.arb
  296. widgets_ka.arb
  297. widgets_kk.arb
  298. widgets_km.arb
  299. widgets_kn.arb
  300. widgets_ko.arb
  301. widgets_ky.arb
  302. widgets_lo.arb
  303. widgets_lt.arb
  304. widgets_lv.arb
  305. widgets_mk.arb
  306. widgets_ml.arb
  307. widgets_mn.arb
  308. widgets_mr.arb
  309. widgets_ms.arb
  310. widgets_my.arb
  311. widgets_nb.arb
  312. widgets_ne.arb
  313. widgets_nl.arb
  314. widgets_no.arb
  315. widgets_or.arb
  316. widgets_pa.arb
  317. widgets_pl.arb
  318. widgets_ps.arb
  319. widgets_pt.arb
  320. widgets_pt_PT.arb
  321. widgets_ro.arb
  322. widgets_ru.arb
  323. widgets_si.arb
  324. widgets_sk.arb
  325. widgets_sl.arb
  326. widgets_sq.arb
  327. widgets_sr.arb
  328. widgets_sr_Latn.arb
  329. widgets_sv.arb
  330. widgets_sw.arb
  331. widgets_ta.arb
  332. widgets_te.arb
  333. widgets_th.arb
  334. widgets_tl.arb
  335. widgets_tr.arb
  336. widgets_uk.arb
  337. widgets_ur.arb
  338. widgets_uz.arb
  339. widgets_vi.arb
  340. widgets_zh.arb
  341. widgets_zh_HK.arb
  342. widgets_zh_TW.arb
  343. widgets_zu.arb
packages/flutter_localizations/lib/src/l10n/README.md

Material and Cupertino Libraries Localizations

The .arb files in this directory contain localized values (primarily strings) used by the Material and Cupertino libraries. The generated_material_localizations.dart and generated_cupertino_localizations.dart files combine all of the localizations into a single Map that is linked with the rest of flutter_localizations package.

If you're looking for information about internationalizing Flutter apps in general, see the Internationalizing Flutter Apps tutorial.

Translations for one locale: .arb files

The Material and Cupertino libraries use Application Resource Bundle files, which have a .arb extension, to store localized translations of messages, format strings, and other values. This format is also used by the Dart intl package.

The Material and Cupertino libraries only depend on a small subset of the ARB format. Each .arb file contains a single JSON table that maps from resource IDs to localized values.

Filenames contain the locale that the values have been translated for. For example material_de.arb contains German translations, and material_ar.arb contains Arabic translations. Files that contain regional translations have names that include the locale's regional suffix. For example material_en_GB.arb contains additional English translations that are specific to Great Britain.

There is one language-specific .arb file for each supported locale. If an additional file with a regional suffix is present, the regional localizations are automatically merged with the language-specific ones.

The JSON table's keys, called resource IDs, are valid Dart variable names. They correspond to methods from the MaterialLocalizations or CupertinoLocalizations classes. For example:

Widget build(BuildContext context) {
  return TextButton(
    child: Text(
      MaterialLocalizations.of(context).cancelButtonLabel,
    ),
  );
}

This widget build method creates a button whose label is the local translation of “CANCEL” which is defined for the cancelButtonLabel resource ID.

Each of the language-specific .arb files contains an entry for cancelButtonLabel.

material_en.arb and cupertino_en.arb Define all of the resource IDs

All of the material_*.arb files whose names do not include a regional suffix contain translations for the same set of resource IDs as material_en.arb.

Similarly all of the cupertino_*.arb files whose names do not include a regional suffix contain translations for the same set of resource IDs as cupertino_en.arb.

For each resource ID defined for English, there is an additional resource with an ‘@’ prefix. These ‘@’ resources are not used by the generated Dart code at run time, they just exist to inform translators about how the value will be used, and to inform the code generator about what code to write.

"cancelButtonLabel": "CANCEL",
"@cancelButtonLabel": {
  "description": "The label for cancel buttons and menu items.",
  "type": "text"
},

Values with Parameters, Plurals

A few of material translations contain $variable tokens. The Material and Cupertino libraries replace these tokens with values at run-time. For example:

"aboutListTileTitle": "About $applicationName",

The value for this resource ID is retrieved with a parameterized method instead of a simple getter:

MaterialLocalizations.of(context).aboutListTileTitle(yourAppTitle)

The names of the $variable tokens must match the names of the MaterialLocalizations method parameters.

Plurals are handled similarly, with a lookup method that includes a quantity parameter. For example selectedRowCountTitle returns a string like “1 item selected” or “no items selected”.

MaterialLocalizations.of(context).selectedRowCountTitle(yourRowCount)

Plural translations can be provided for several quantities: 0, 1, 2, “few”, “many”, “other”. The variations are identified by a resource ID suffix which must be one of “Zero”, “One”, “Two”, “Few”, “Many”, “Other”. The “Other” variation is used when none of the other quantities apply. All plural resources must include a resource with the “Other” suffix. For example the English translations (‘material_en.arb’) for selectedRowCountTitle are:

"selectedRowCountTitleZero": "No items selected",
"selectedRowCountTitleOne": "1 item selected",
"selectedRowCountTitleOther": "$selectedRowCount items selected",

When defining new resources that handle pluralizations, the “One” and the “Other” forms must, at minimum, always be defined in the source English ARB files.

scriptCategory and timeOfDayFormat for Material library

In material_en.arb, the values of these resource IDs are not translations, they‘re keywords that help define an app’s text theme and time picker layout respectively.

The value of timeOfDayFormat defines how a time picker displayed by showTimePicker() formats and lays out its time controls. The value of timeOfDayFormat must be a string that matches one of the formats defined by https://api.flutter.dev/flutter/material/TimeOfDayFormat.html. It is converted to an enum value because the material_en.arb file has this value labeled as "x-flutter-type": "icuShortTimePattern".

The value of scriptCategory is based on the Language categories reference section in the Material spec. The Material theme uses the scriptCategory value to lookup a localized version of the default TextTheme, see Typography.geometryThemeFor.

‘generated_*_localizations.dart’: all of the localizations

All of the localizations are combined in a single file per library using the gen_localizations script.

You can see what that script would generate by running:

dart dev/tools/localization/bin/gen_localizations.dart

Actually update the generated files with:

dart dev/tools/localization/bin/gen_localizations.dart --overwrite

The gen_localizations script just combines the contents of all of the .arb files, each into a class which extends Global*Localizations. The MaterialLocalizations and CupertinoLocalizations class implementations use these to lookup localized resource values.

The gen_localizations script must be run by hand after .arb files have been updated. The script optionally takes parameters

  1. The path to this directory,
  2. The file name prefix (the file name less the locale suffix) for the .arb files in this directory.

Special handling for the Kannada (kn) translations

Originally, the cupertino_kn.arb and material_kn.arb files contained unicode characters that can cause current versions of Emacs on Linux to crash. There is more information here: https://github.com/flutter/flutter/issues/36704.

Rather than risking developers' editor sessions, the strings in these arb files (and the code generated for them) have been encoded using the appropriate escapes for JSON and Dart. The JSON format arb files were rewritten with dev/tools/localization/bin/encode_kn_arb_files.dart. The localizations code generator uses generateEncodedString() from dev/tools/localization/localizations_utils.dart.

Support for Pashto (ps) translations

When Flutter first set up i18n for the Material library, Pashto (ps) translations were included for the first set of Material widgets. However, Pashto was never set up to be continuously maintained in Flutter by Google, so material_ps.arb was never updated beyond the initial commit.

To prevent breaking applications that rely on these original Pashto translations, they will be kept. However, all new strings will have the English translation until support for Pashto is provided. See https://github.com/flutter/flutter/issues/60598.

Translations Status, Reporting Errors

The translations (the .arb files) in this directory are based on the English translations in material_en.arb and cupertino_en.arb. Google contributes translations for all the languages supported by this package. (Googlers, for more details see <go/flutter-l10n>.)

If you have feedback about the translations please file an issue on the Flutter github repo.

See Also

The Internationalizing Flutter Apps tutorial describes how to use the internationalization APIs in an ordinary Flutter app.

Application Resource Bundle covers the .arb file format used to store localized translations of messages, format strings, and other values.

The Dart intl package supports internationalization.