setCurrentLocale function
Sets the locale of the current scope (Laravel's App::setLocale), so
concurrent requests never see each other's; outside any scope, the
application's.
Implementation
void setCurrentLocale(String locale) {
final scope = _scope();
if (scope != null) {
scope.put<_ActiveLocale>(_ActiveLocale(locale));
} else {
_application.value = locale;
}
}