Php locale configuration in php.ini

2019-01-27 22:55发布

问题:

Can a default locale value be places in php.ini or .htaccess ?

The equivalent of the php function

   setlocale(LC_MONETARY, 'it_IT');

for example

回答1:

It can, take a look at intl.default_locale.



回答2:

There's nothing in the php.ini to help you. But as alternative you could try setting environment variables from .htaccess

SetEnv   LC_ALL  it_IT.UTF-8

But these settings only take effect for CGI and FastCGI versions of PHP at best, not for the usual mod_php installation.



标签: locale php