LocalizationManager constructor
LocalizationManager({})
Creates a localization manager with the necessary initial setup.
supportedLocales is a list of locales that the application supports.
initialLocale is the locale to be set initially.
initialTranslations is a list of initial translation keys to load.
debugMode enables or disables debug logging.
saveLocale determines whether to save the locale to persistent storage.
Implementation
LocalizationManager({
required this.supportedLocales,
required Locale initialLocale,
required List<String> initialTranslations,
required this.debugMode,
this.saveLocale = true,
}) : currentLocale = initialLocale,
logger = Logger(debugMode: debugMode) {
translator = TranslatorPro();
loader = LoaderPro(logger);
_init(initialTranslations, initialLocale);
}