diff --git a/cms/envs/bok_choy.env.json b/cms/envs/bok_choy.env.json index b858d70077..eb613edafc 100644 --- a/cms/envs/bok_choy.env.json +++ b/cms/envs/bok_choy.env.json @@ -75,7 +75,7 @@ "PREVIEW_LMS_BASE": "preview.localhost:8003", "ENABLE_CONTENT_LIBRARIES": true, "ENABLE_SPECIAL_EXAMS": true, - "SHOW_LANGUAGE_SELECTOR": true, + "SHOW_HEADER_LANGUAGE_SELECTOR": true, "ENABLE_EXTENDED_COURSE_DETAILS": true, "CUSTOM_COURSES_EDX": true }, diff --git a/cms/envs/common.py b/cms/envs/common.py index e8579c8f3a..cef002da59 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -227,8 +227,8 @@ FEATURES = { 'ORGANIZATIONS_APP': False, - # Show Language selector - 'SHOW_LANGUAGE_SELECTOR': False, + # Show the language selector in the header + 'SHOW_HEADER_LANGUAGE_SELECTOR': False, # Set this to False to facilitate cleaning up invalid xml from your modulestore. 'ENABLE_XBLOCK_XML_VALIDATION': True, diff --git a/cms/templates/widgets/header.html b/cms/templates/widgets/header.html index 595e217934..7e4439f617 100644 --- a/cms/templates/widgets/header.html +++ b/cms/templates/widgets/header.html @@ -4,6 +4,7 @@ from django.conf import settings from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ + from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_enabled, released_languages %>
- % if static.show_language_selector(): - <% languages = static.get_released_languages() %> + % if header_language_selector_is_enabled(): + <% languages = released_languages() %> % if len(languages) > 1: - % if include_language_selector: - <%include file="widgets/footer-language-selector.html"/> + % if context.get('include_language_selector', footer_language_selector_is_enabled()): + <%include file="${static.get_template_path('widgets/footer-language-selector.html')}"/> % endif