2020-09-18 19:36:41 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:freezer/languages/ar_ar.dart';
|
|
|
|
import 'package:freezer/languages/de_de.dart';
|
|
|
|
import 'package:freezer/languages/en_us.dart';
|
2020-09-22 19:13:54 +02:00
|
|
|
import 'package:freezer/languages/es_es.dart';
|
|
|
|
import 'package:freezer/languages/fil_ph.dart';
|
2020-09-18 19:36:41 +02:00
|
|
|
import 'package:freezer/languages/it_it.dart';
|
|
|
|
import 'package:freezer/languages/pt_br.dart';
|
|
|
|
import 'package:freezer/languages/ru_ru.dart';
|
|
|
|
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 19:13:54 +02:00
|
|
|
const Locale('ru', 'RU'),
|
|
|
|
const Locale('es', 'ES'),
|
|
|
|
const Locale('fil', 'PH')
|
2020-09-18 19:36:41 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
extension Localization on String {
|
|
|
|
static var _t = Translations.byLocale("en_US") +
|
2020-09-22 19:13:54 +02: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;
|
2020-09-18 19:36:41 +02:00
|
|
|
|
|
|
|
String get i18n => localize(this, _t);
|
|
|
|
}
|