I need to know what language it returns, so that I can perform my own actions.
views:
56answers:
2
+1
Q:
Django LocaleMiddleware determines the language for me. How do I know what language it determined?
+3
A:
from django.utils import translation
def myview(...):
...
lang = translation.get_language()
...
This will return the language code used in the current thread, so in your case, that set by the middleware.
KillianDS
2010-05-24 23:42:39
+1
A:
templates with RequestContext have {{ LANGUAGE_CODE }} by default. http://docs.djangoproject.com/en/dev/topics/i18n/internationalization/#other-tags