Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

language_chooser doesn't take `SITE_ID` into account #1873

Open
Bouke opened this Issue · 5 comments

5 participants

@Bouke

in menus/templates/menu/language_chooser.html all languages are fetched:

{% get_available_languages as languages %}

However, using CMS_LANGUAGES I have defined a mixed set of languages depending on the SITE_ID. This setting should be taken into account for creating the language chooser, I suppose?

@digi604
Collaborator

Is this 2.4 or 3?

@Bouke

2.4

@digi604
Collaborator

needs a pull request and tests

@czpython czpython was assigned
@digi604 digi604 modified the milestone: Some Day, 3.0
@yakky
Collaborator

Do we really need {% get_available_languages as languages %} string in language_chooser.html?
Context is populated by languages filtered by site by the language chooser templatetags (both in 2.4 and 3.0)

@richardbarran

I have been working with the language_chooser, and I have noticed that the {% get_available_languages as languages %} is indeed redundant - and worse, buggy.
A languages variable is set in the context here https://github.com/divio/django-cms/blob/develop/menus/templatetags/menu_tags.py#L373.
This context variable is then overridden by https://github.com/divio/django-cms/blob/develop/menus/templates/menu/language_chooser.html#L3.
However this new value is not reading from CMS_LANGUAGES, so ignores information such as - for example - if we have set a language to 'public': False.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.