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

(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.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply


Messages In This Thread
RE: Dynamically changing supported languages - by includebeer - 10-30-2021, 06:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB