Django app won't find translations in IDE but works from command line

Oct 30, 2013 at 8:17 PM
I have a Django app that is working perfectly from the IDE with the exception of translations. However, when I run the app from the command line translations do work.

I am thinking maybe it isn't able to find the locale directory when it is in the IDE or is actually running the app behind the scenes in another directory or something.

Help anyone?
Nov 1, 2013 at 7:44 PM
Edited Nov 1, 2013 at 7:44 PM
I tried it with VS 2012/Django 1.5.5 using both global CPython 2.7 and a 2.7 based virtual env, and they worked fine. I set the LANGUAGE_CODE in to do my testing.

My django app 'news' was created in the root of the project folder, and I created a 'locale' folder underneath the 'news' folder. Then I used with makemessages and compilemessages to get a compiled .mo file.

So my folder structure looked like:

F5, Ctrl-F5 and command line runserver all found my translated strings.

Let us know if you did differently, or used a different version of Python/Django so we can try it out.

There's some info here that may help you: