L10nTranslate extension

For example, the Map variables would be defined in separate .dart files

@override Map<Locale, Map<String, String>> get l10nMap => { const Locale('ar', 'SA'): arSA, const Locale('hi', 'IN'): hiIN, const Locale('es', 'AR'): esAR, const Locale('fr', 'FR'): frFR, const Locale('pt', 'PT'): ptPT, const Locale('ko', 'KP'): koKP, const Locale('zh', 'CN'): zhCN, };

/// The text's original Locale static Locale get textLocale => const Locale('en', 'US');

Each file will be dedicated to one particular Localization language: translations_arSA.dart translations_hiIN.dart translations_esAR.dart translations_frFR.dart translations_ptPT.dart translations_zhCN.dart

As an example, in the file translations_frFR.dart below:

Map<String, String> frFR = { 'Parent': 'Parent', 'Child': 'Enfant', 'Quickstart': 'Démarrage rapide', 'Get Started': 'Commencer', 'Parents': 'Parents', 'Students': 'Étudiants', 'Teachers': 'Enseignants', 'Sign in': "S'identifier", 'Information': 'Information', 'Choose a password': 'Choisissez un mot de passe', 'Next': 'Suivant', 'Yes': 'Oui', 'No': 'Non', 'Name': 'Nom', 'Age': 'Âge', 'Add': 'Ajouter', 'Email address': 'Adresse e-mail', 'Password': 'Mot de passe', 'Remember Me': 'Souviens-toi de moi', 'Forgot Password?': 'Mot de passe oublié?', "Don't have an Account?": "Vous n'avez pas de compte ?", 'New Account': 'Nouveau compte', 'Sign Up': "S'inscrire", 'Courses': 'Cours', 'Subject': 'Sujet', 'Exams': 'Examens', 'Premium': 'Prime', 'Free': 'Libérer', 'Enrollments': 'Inscriptions', 'Subscription': 'Abonnement', 'Messages': 'Messages', 'Transactions': 'Transactions', 'Link': 'Lien', 'Bad Request': 'Mauvaise demande', 'Forbidden': 'Interdit', 'Unauthorized': 'Non autorisé', 'Try again later': 'Réessayez plus tard', 'Internal': 'Interne', 'Unknown': 'Inconnue', 'Timeout': 'Temps libre', 'Default': 'Défaut', 'Cache': 'Cache', 'Internet': "l'Internet", 'Content': 'Contenu', 'Change Language': 'Changer de langue', 'Logout': 'Se déconnecter', 'Log In': 'Connexion', }; Provide the suffix on every string for translation. Append to the end of Strings to change to a translation.

on

Properties

tr String
no setter