1

I went through many posts but not able to resolve problem, may be problem is something else.

Application is using django and appengine

When I select a language (for ex: "Spanish (es)"), everything working perfectly fine even python translation strings. But when I switch to some other language (for ex: "Japanese (ja)"), HTML is working but some python translation is still using "Spanish (es)" language (Previous Language).

In middleware classes, I am setting:

1. request.LANGUAGE_CODE
2. request.session['django_language']
3. settings.LANGUAGE_CODE (may be not required, but still updating)
4. request.COOKIE['django_language']
5. translation.activate('<lang>')

And in processing response, I am:

 1. translation.deactivate()
 2. translation.deactivate_all()

I am not sure, what exactly the problem? But I guess, initially when application load, it configured itself with instruction in settings.py and whatever python script loads at that time, they are fixed in translation. I use custom AUTH_USER_MODULE and AUTH_ADMIN_MODULE instead of django defined.

Any idea, what wrong am I doing? Much appreciate your help.

Let me know, if you need more information on this.

Thanks

Love Sharma
  • 1,981
  • 1
  • 18
  • 37
  • Did you run `django-admin.py makemessages` and `compilemessages` for japanese language? – sultan Sep 24 '12 at 14:30
  • Yes, Everything working fine, if you first go with "JA" and then "ES". Then some python file using previous lang. i.e, "JA". – Love Sharma Sep 24 '12 at 15:16

0 Answers0