Search code examples
pythondjangointernationalizationtranslationdjango-i18n

How to get the current language in Django?


How can I get the current language in Django?


Solution

  • Functions of particular interest are django.utils.translation.get_language() which returns the language used in the current thread. See documentation.