You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
samples/gallery/lib/l10n
Pierre-Louis cee267cf88
[Gallery] Fix directory structure (#312)
6 years ago
..
README.md [Gallery] Fix directory structure (#312) 6 years ago
gallery_localizations.dart [Gallery] Fix directory structure (#312) 6 years ago
intl_af.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_am.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ar.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ar_EG.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ar_JO.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ar_MA.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ar_SA.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_as.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_az.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_be.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_bg.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_bn.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_bs.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ca.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_cs.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_da.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_de.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_de_AT.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_de_CH.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_el.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_en_AU.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_en_CA.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_en_GB.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_en_IE.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_en_IN.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_en_NZ.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_en_SG.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_en_US.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_en_US.xml [Gallery] Fix directory structure (#312) 6 years ago
intl_en_ZA.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_419.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_AR.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_BO.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_CL.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_CO.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_CR.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_DO.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_EC.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_GT.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_HN.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_MX.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_NI.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_PA.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_PE.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_PR.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_PY.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_SV.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_US.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_UY.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_es_VE.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_et.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_eu.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_fa.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_fi.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_fil.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_fr.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_fr_CA.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_fr_CH.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_gl.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_gsw.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_gu.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_he.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_hi.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_hr.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_hu.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_hy.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_id.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_is.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_it.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ja.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ka.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_kk.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_km.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_kn.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ko.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ky.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_lo.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_lt.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_lv.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_mk.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ml.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_mn.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_mr.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ms.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_my.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_nb.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ne.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_nl.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_or.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_pa.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_pl.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_pt.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_pt_BR.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_pt_PT.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ro.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ru.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_si.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_sk.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_sl.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_sq.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_sr.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_sr_Latn.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_sv.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_sw.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ta.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_te.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_th.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_tl.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_tr.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_uk.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_ur.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_uz.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_vi.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_zh.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_zh_CN.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_zh_HK.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_zh_TW.arb [Gallery] Fix directory structure (#312) 6 years ago
intl_zu.arb [Gallery] Fix directory structure (#312) 6 years ago
messages_af.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_all.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_am.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ar.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ar_EG.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ar_JO.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ar_MA.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ar_SA.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_as.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_az.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_be.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_bg.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_bn.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_bs.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ca.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_cs.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_da.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_de.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_de_AT.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_de_CH.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_el.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_en_AU.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_en_CA.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_en_GB.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_en_IE.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_en_IN.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_en_NZ.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_en_SG.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_en_US.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_en_ZA.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_419.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_AR.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_BO.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_CL.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_CO.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_CR.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_DO.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_EC.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_GT.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_HN.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_MX.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_NI.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_PA.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_PE.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_PR.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_PY.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_SV.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_US.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_UY.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_es_VE.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_et.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_eu.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_fa.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_fi.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_fil.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_fr.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_fr_CA.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_fr_CH.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_gl.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_gsw.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_gu.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_he.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_hi.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_hr.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_hu.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_hy.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_id.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_is.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_it.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ja.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ka.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_kk.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_km.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_kn.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ko.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ky.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_lo.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_lt.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_lv.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_messages.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_mk.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ml.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_mn.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_mr.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ms.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_my.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_nb.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ne.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_nl.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_or.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_pa.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_pl.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_pt.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_pt_BR.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_pt_PT.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ro.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ru.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_si.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_sk.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_sl.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_sq.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_sr.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_sr_Latn.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_sv.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_sw.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ta.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_te.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_th.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_tl.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_tr.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_uk.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_ur.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_uz.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_vi.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_zh.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_zh_CN.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_zh_HK.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_zh_TW.dart [Gallery] Fix directory structure (#312) 6 years ago
messages_zu.dart [Gallery] Fix directory structure (#312) 6 years ago

README.md

Localization

Creating New Locale Messages

When adding new strings to be localized, update intl_en_US.arb, which is used by this project as the template. When creating new entries, they have to be in the following format:

  "dartGetterVariableName": "english translation of the message",
  "@dartGetterVariableName": {
    "description": "description that the localizations delegate will use."
  },

In this example, dartGetterVariableName should be the Dart method/property name that you will be using in your localizations delegate.

After adding the new message in intl_en_US.arb, it can be used in the app by regenerating the GalleryLocalizations delegate and the messages_*.dart files. This allows use of the English message through your localizations delegate in the application code immediately without having to wait for the translations to be completed.

How to Generate GalleryLocalizations with Grinder

From the samples/gallery/ directory:

  1. Make sure you have grinder installed by running flutter pub get.
  2. Then run flutter pub run grinder l10n to generate GalleryLocalizations.

For more details on what flutter pub run grinder l10n runs, you can read below under How to Generate GalleryLocalizations with l10n scripts. The current supported locales list is sorted alphabetically. This means that after running the script, you have to update gallery_localizations.dart and move the en_US locale to the top of the list.

How to Generate GalleryLocalizations with l10n scripts

To generate GalleryLocalizations, from samples/gallery/ run:

dart ${YOUR_FLUTTER_PATH}/dev/tools/localization/bin/gen_l10n.dart \
    --template-arb-file=intl_en_US.arb \
    --output-localization-file=gallery_localizations.dart \
    --output-class=GalleryLocalizations

From samples/gallery/, run dart tool/l10n_cli/main.dart, which will generate intl_en_US.xml. This will be used by the internal translation console to generate messages in the different locales.

Run the formatter to make the Flutter analyzer happy:

flutter format .

Generating New Locale Arb Files

Use the internal tool to create the intl_<locale>.arb files once the translations are ready.

Generating Flutter Localization Files

If new translations are ready and the intl_<locale>.arb files are already available, run the following commands to generate all necessary messages_<locale>.dart files and the localizations_delegate.dart file:

flutter pub run grinder l10n

which is equal to

dart ${YOUR_FLUTTER_PATH}/dev/tools/localization/bin/gen_l10n.dart \
    --template-arb-file=intl_en_US.arb \
    --output-localization-file=gallery_localizations.dart \
    --output-class=GalleryLocalizations

flutter format .

This ensures the generated .dart files updated with the latest translations.