问题
I saw this question, but it don't answers me.
I have set APP_LOCALE=fr in the .env file, but I still get date in english format :
string 'Thursday, 09h00' (length=15)
And I would like to get :
string 'Jeudi, 09h00' (length=12)
How to change from english to french on Lumen Framework ?
(Added PHP tag to be more seen)
回答1:
In lumen you cannot set the locale in your config. You can however change the locale in code by using app('translator')->setLocale($locale);.
In my own projects I set the default locale by adding app('translator')->setLocale('fr'); in the /bootstrap/app.php file before the line return $app;.
来源:https://stackoverflow.com/questions/32630039/how-to-change-locale-language-on-lumen