reloadLocale function
Reloads the locale for the AppLocalizations class with a locale.
Implementation
reloadLocale(BuildContext context, Locale locale) async {
AppLocalizations.of(context)!.locale = locale;
await AppLocalizations.of(context)!.load();
}