Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to display a date in french locale.
A solution is to use setlocale(LC_TIME, 'fr_FR');
But I'm looking to set the locale directly in the configuration of my apache server.
In the /etc/httpd/conf/httpd.conf file, I tried

<VirtualHost *:80>
    ...
    SetEnv LC_TIME 'fr_FR'
</VirtualHost>

without any effect.
In which php or apache configuration file should I define the LC_TIME variable?

share|improve this question
add comment

1 Answer 1

The httpd.conf file is not typically used to set this parameter. Instead, you will want to edit the /etc/php.ini file and set the timezone in date.timezone:

Europe/Paris

Timezone information can be found on the PHP website http://www.php.net/manual/en/timezones.europe.php

Remember to restart Apache once the changes are made if you are not using PHP-FPM.

share|improve this answer
    
Unfortunately timezone doesn't manage the locale for date (language for date) neither the LC_TIME variable. –  Nicolas May 26 '13 at 23:53
    
    
Thanks for the link, but it doesn't answer to my question. I look for a configuration file to set the locale. –  Nicolas May 27 '13 at 10:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.