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.

Lars-Janssen

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

janakaontomatrix

@lars6 Thank you I'll look into it.

bestmomo

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

papa

@janakaontomatrix you may use also a middleware.

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