2020-09-18 17:36:41 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:freezer/languages/ar_ar.dart';
|
|
|
|
import 'package:freezer/languages/de_de.dart';
|
2020-10-09 18:52:45 +00:00
|
|
|
import 'package:freezer/languages/el_gr.dart';
|
2020-09-18 17:36:41 +00:00
|
|
|
import 'package:freezer/languages/en_us.dart';
|
2020-09-22 17:13:54 +00:00
|
|
|
import 'package:freezer/languages/es_es.dart';
|
|
|
|
import 'package:freezer/languages/fil_ph.dart';
|
2020-10-09 18:52:45 +00:00
|
|
|
import 'package:freezer/languages/fr_fr.dart';
|
|
|
|
import 'package:freezer/languages/he_il.dart';
|
|
|
|
import 'package:freezer/languages/hr_hr.dart';
|
2020-10-14 19:09:16 +00:00
|
|
|
import 'package:freezer/languages/id_id.dart';
|
2020-09-18 17:36:41 +00:00
|
|
|
import 'package:freezer/languages/it_it.dart';
|
2020-10-09 18:52:45 +00:00
|
|
|
import 'package:freezer/languages/ko_ko.dart';
|
2020-09-18 17:36:41 +00:00
|
|
|
import 'package:freezer/languages/pt_br.dart';
|
2020-10-11 20:06:29 +00:00
|
|
|
import 'package:freezer/languages/ro_ro.dart';
|
2020-09-18 17:36:41 +00:00
|
|
|
import 'package:freezer/languages/ru_ru.dart';
|
2020-10-11 20:06:29 +00:00
|
|
|
import 'package:freezer/languages/tr_tr.dart';
|
2020-09-18 17:36:41 +00:00
|
|
|
import 'package:i18n_extension/i18n_extension.dart';
|
|
|
|
|
|
|
|
const supportedLocales = [
|
|
|
|
const Locale('en', 'US'),
|
|
|
|
const Locale('ar', 'AR'),
|
|
|
|
const Locale('pt', 'BR'),
|
|
|
|
const Locale('it', 'IT'),
|
|
|
|
const Locale('de', 'DE'),
|
2020-09-22 17:13:54 +00:00
|
|
|
const Locale('ru', 'RU'),
|
|
|
|
const Locale('es', 'ES'),
|
2020-10-09 18:52:45 +00:00
|
|
|
const Locale('hr', 'HR'),
|
|
|
|
const Locale('el', 'GR'),
|
|
|
|
const Locale('ko', 'KO'),
|
|
|
|
const Locale('fr', 'FR'),
|
|
|
|
const Locale('he', 'IL'),
|
2020-10-11 20:06:29 +00:00
|
|
|
const Locale('tr', 'TR'),
|
|
|
|
const Locale('ro', 'RO'),
|
2020-10-14 19:09:16 +00:00
|
|
|
const Locale('id', 'ID'),
|
2020-09-22 17:13:54 +00:00
|
|
|
const Locale('fil', 'PH')
|
2020-09-18 17:36:41 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
extension Localization on String {
|
|
|
|
static var _t = Translations.byLocale("en_US") +
|
2020-10-09 18:52:45 +00:00
|
|
|
language_en_us + language_ar_ar + language_pt_br + language_it_it + language_de_de + language_ru_ru +
|
|
|
|
language_fil_ph + language_es_es + language_el_gr + language_hr_hr + language_ko_ko + language_fr_fr +
|
2020-10-14 19:09:16 +00:00
|
|
|
language_he_il + language_tr_tr + language_ro_ro + language_id_id;
|
2020-09-18 17:36:41 +00:00
|
|
|
|
|
|
|
String get i18n => localize(this, _t);
|
|
|
|
}
|