(10-30-2021, 06:01 AM)includebeer Wrote: (10-29-2021, 01:13 PM)chronic Wrote: I have seen that if I change the value in the "system\HTTP\IncomingRequest.php" file constructor:
from
PHP Code:
$this->validLocales = $config->supportedLocales;
to
PHP Code:
$this->validLocales = service('settings')->get('App.supportedLocales');
then it works fine as I expect, but I would like to avoid modifying the files under system folder.
Yeah, don't do that. Changing system files is the worst solution. Look at this page, you should be able to extend the IncomingRequest class and override the constructor.
I tried to play a bit with the code of the page you suggested, but I couldn't find a solution, maybe it's a bit too much for my abilities.