Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is i18n get_current_language needed any more ? #6720

Open
stuaxo opened this issue Aug 21, 2019 · 0 comments

Comments

@stuaxo
Copy link

commented Aug 21, 2019

The Django bug this references was shut 6 years ago, so maybe the function itself could be deprecated with a view to removing it ?

https://github.com/divio/django-cms/blob/develop/cms/utils/i18n.py#L75

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.