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
%>
@@ -183,8 +184,8 @@
- % 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
diff --git a/lms/templates/navigation.html b/lms/templates/navigation.html
index 5ca116a8c7..90d6156c00 100644
--- a/lms/templates/navigation.html
+++ b/lms/templates/navigation.html
@@ -14,6 +14,7 @@ from branding import api as branding_api
# app that handles site status messages
from status.status import get_site_status_msg
from openedx.features.enterprise_support.api import get_enterprise_customer_logo_url
+from openedx.core.djangoapps.lang_pref.api import header_language_selector_is_enabled, released_languages
%>
## Provide a hook for themes to inject branding on top.
@@ -176,8 +177,8 @@ site_status_msg = get_site_status_msg(course_id)
%block>
% endif
- % if static.show_language_selector():
- <% languages = static.get_released_languages() %>
+ % if header_language_selector_is_enabled():
+ <% languages = released_languages() %>
% if len(languages) > 1:
diff --git a/lms/templates/widgets/footer-language-selector.html b/lms/templates/widgets/footer-language-selector.html
index 4a8b44e552..d18450ddbd 100644
--- a/lms/templates/widgets/footer-language-selector.html
+++ b/lms/templates/widgets/footer-language-selector.html
@@ -15,6 +15,7 @@
if not settings.LANGUAGE_COOKIE:
raise ValueError('settings.LANGUAGE_COOKIE is required to use footer-language-selector.')
%>
+<%namespace name='static' file='../static_content.html'/>