Translation not recognized when not using requests
|Reported by:||dauerbaustelle||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'm currently using django's ORM and translation library for a project. I'm using
ugettext for marking strings as translatable and
LANGUAGE_CODE is correctly set ("de-DE" in my case). However, django does not correctly recognize the language,
django.utils.translation.get_language() always returns the default "en-us". If I set the language manually via
get_language returns that language code but the actual translation seems to have happened before so there's no way to get the translated strings.
By the way, using django's admin interface the right language is used. I have added the
LocalizationMiddleware to the list of active middlewares. Don't hesitate to go through the code linked above.