Welcome Guest, Not a member yet? Register   Sign In
Dynamically changing supported languages
#14

(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.
Reply


Messages In This Thread
RE: Dynamically changing supported languages - by chronic - 10-31-2021, 09:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB