Welcome Guest, Not a member yet? Register   Sign In
supported locales (array) in .env
#3

(08-14-2020, 07:46 AM)parisiam Wrote: Hi all,

I'm trying to set the $supportedLocales into the .env file and it's not working.

$supportedLocales comes as an array, so in the config file, it sould be in, for example :
PHP Code:
public $supportedLocales = ['en''fr']; 

But it seems that the .env file in CodeIgniter does not support arrays, am I right?

I've tried various solutions, but none of them worked:

Code:
app.supportedLocales = en,fr
app.supportedLocales = 'en,fr'
app.supportedLocales = ['en','fr']
app.supportedLocales = "['en','fr']"
app.supportedLocales = '["en","fr"]'

Any ideas?

Did you find a solution instead of change app/Config/App.php file? Thanks.
Reply


Messages In This Thread
supported locales (array) in .env - by parisiam - 08-14-2020, 07:46 AM
RE: supported locales (array) in .env - by rodrigoguariento - 08-07-2022, 02:30 PM
RE: supported locales (array) in .env - by kenjis - 08-12-2022, 02:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB