Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Is i18n get_current_language needed any more ? #6720
The Django bug this references was shut 6 years ago, so maybe the function itself could be deprecated with a view to removing it ?
def get_current_language(): """ Returns the currently active language It's a replacement for Django's translation.get_language() to make sure the LANGUAGE_CODE will be found in LANGUAGES. Overcomes this issue: https://code.djangoproject.com/ticket/9340 """ language_code = translation.get_language() return get_language_code(language_code)