-
-
Save hitherejoe/820c2df169f4566cf3386f92df939e69 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AppLocalizations { | |
static Future<AppLocalizations> load(Locale locale) { | |
final String name = | |
locale.countryCode.isEmpty ? locale.languageCode : locale.toString(); | |
final String localeName = Intl.canonicalizedLocale(name); | |
return initializeMessages(localeName).then((bool _) { | |
Intl.defaultLocale = localeName; | |
return new AppLocalizations(); | |
}); | |
} | |
static AppLocalizations of(BuildContext context) => | |
Localizations.of<AppLocalizations>(context, AppLocalizations); | |
String get applicationTitle => | |
Intl.message('HashTrack', | |
name: 'applicationTitle', desc: 'The application title'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment