So that is what I have in os.environ with Apache : LANG = en TZ = France/Paris DJANGO_SETTINGS_MODULE = setting.production SHLVL = 1 APACHE_RUN_USER = www-data APACHE_PID_FILE = /var/run/apache2.pid PWD = /home/git/pyki/public APACHE_RUN_GROUP = www-data TMPDIR = /tmp/passenger.31221/var HOME = /var/www PATH = /usr/local/bin:/usr/bin:/bin _ = /usr/sbin/apache2
And with the development server : LANG = en_GB TERM = xterm SHELL = /bin/bash TZ = France/Paris RUN_MAIN = true SHLVL = 1 SSH_TTY = /dev/pts/0 OLDPWD = /home/git/pyki/content PWD = /home/git/pyki SSH_CLIENT = 193.251.16.192 2616 22 DJANGO_SETTINGS_MODULE = pyki.settings USER = dmathieu PATH = /usr/local/bin:/usr/bin:/bin:/usr/games MAIL = /var/mail/dmathieu LOGNAME = dmathieu SSH_CONNECTION = 193.251.16.192 2616 213.251.184.40 22 HOME = /home/ _ = /usr/bin/python On Jun 1, 10:58 pm, Damien MATHIEU <4...@dmathieu.com> wrote: > Thank you Karen for being more precise and writing something > understandable. > > On Jun 1, 5:15 pm, Karen Tracey <kmtra...@gmail.com> wrote: > > > On Mon, Jun 1, 2009 at 8:39 AM, Damien MATHIEU <4...@dmathieu.com> wrote: > > > > Based on the advices of a friend, I've tried with mod_wsgi instead of > > > mod_python. > > > However, it still doesn't work. > > > > And the sys.path is similar to the one I have when I do a manage.py > > > runserver (where I correctly have my language strings). > > > > So it's not a path problem. > > > You've included Graham's response below but you have apparently not acted on > > any of its advice. Graham doesn't mention a path problem, nor does he > > suggest that switching to mod_wsgi would fix the issue: he mentions an > > environment problem, specifically related to the locale environment > > variables. Perhaps if you follow Graham's advice below about writing a view > > that displays os.environ variables and compare the values between > > development server and Apache you will make more progress. > > > Karen > > > > On May 29, 1:51 am, Graham Dumpleton <graham.dumple...@gmail.com> > > > wrote: > > > > On May 28, 11:56 pm, Damien MATHIEU <4...@dmathieu.com> wrote: > > > > > > Hi, > > > > > > Using the internal web server, I correctly load every language string > > > > > located in application_path/locale/language/LC_MESSAGES/django.mo > > > > > But whenever I use Apache, they don't appear to be loaded anymore. > > > > > > However it appear the default ones are loaded. > > > > > The languages names are appropriately translated (French to Français > > > > > for example). > > > > > > I have the following virtual host : > > > > > <VirtualHost *:80> > > > > > DocumentRoot /home/git/refdoc > > > > > ServerName doc.tmp.dev.refstats.net > > > > > ServerAlias doc.tmp.dev.refstats.net > > > > > SetEnv DJANGO_SETTINGS_MODULE setting.production > > > > > > <Location "/"> > > > > > SetHandler python-program > > > > > PythonHandler django.core.handlers.modpython > > > > > PythonPath "['/home/git/refdoc'] + sys.path > > > > > PythonDebug On > > > > > </Location> > > > > > </VirtualHost> > > > > > > And I use localeurl :http://code.google.com/p/django-localeurl/ > > > > > > Thanks by advance for any help you'll hopefully provide me. > > > > > The development server is likely working because it is picking up > > > > locale and language environment variables from your personal account. > > > > When running Apache, which starts up as root before changing to non > > > > privileged user, it will not be getting those environment variables > > > > from your personal account. As such, it will use whatever is the > > > > system default. > > > > > Often it is not enough to just set the variables from inside Apache or > > > > your code and you need to ensure they are set in the environment of > > > > Apache when it runs. How this is done depends a bit on whether you are > > > > using Apache compiled from source or some specific operating systems > > > > distribution. > > > > > I would start by writing a test URL which dumps out os.environ in each > > > > way of running it, then compare settings for LC_* and LANG environment > > > > variables. > > > > > Graham > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---