load method
Load Json File name based on Language Code and Country Code. Example: "{languageCode}_{countryCode}.json" > "en_us.json"
Implementation
Future<bool> load() async {
String fileName = _deriveFileName();
String localeCustomPath = prepareLocaleCustomPath();
TGLog.d("TGLocalization.load : " + fileName);
if (localeCustomPath == TGLocalization.LOCALE_PATH) {
_entries =
await TGFileUtil.readJsonFileAsMap("$localeCustomPath$fileName");
} else {
_entries = await TGFileUtil.readJsonFileAsMapFromUrl(
"$localeCustomPath$fileName");
}
TGLocale.localizations[locale.toString()] = this;
return true;
}