Localization set a locale

Published 11 months ago by janakaontomatrix

When we set a locale we use App::setLocale($locale). Is this a global setting or do we have to set this every time a page loads. The documentation does not have anything on this. Help is appreciated. Thank you.


You should set this in the boot method of you AppServiceProvider.php. (if that's what you mean)


@lars6 Thank you I'll look into it.


The locale setted with setLocale is only for the current request as any config parameter.


@janakaontomatrix you may use also a middleware.

Please sign in or create an account to participate in this conversation.