changeLocale method
Changes the current locale, reloading all necessary translations and triggering a UI rebuild.
Implementation
void changeLocale(BuildContext context, Locale newLocale) {
logger.log("Changing locale to: ${newLocale.toLanguageTag()}");
currentLocale = newLocale;
loadInitialTranslations(newLocale, _includedTranslations);
(context as Element).markNeedsBuild();
}