init static method
Initialize Localization (i18n) implementation
Implementation
static void init(
{required Locale defaultLocale,
List<Locale>? otherLocales,
String customPath = ""}) {
List<Locale> supportedLocales = [];
supportedLocales.add(defaultLocale);
if (otherLocales != null && otherLocales.length > 0)
supportedLocales.addAll(otherLocales);
TGLocale.supportedLocales = supportedLocales;
TGLocale.defaultLocale = defaultLocale;
TGLocale.currentLocale = defaultLocale;
TGLocale.customPath = customPath;
loadLocales();
}