guangyaw
(Guangyaw Li)
May 5, 2022, 7:23am
1
from tutor import hooks
hooks.Filters.ENV_PATCHES.add_item(
(
“openedx-lms-common-settings”,
“FEATURES[‘SHOW_HEADER_LANGUAGE_SELECTOR’] = True”
)
)
Above is the code of the patch for Tutor maple.
It could show correctly ,but it doesn’t work when I select another language.
Is there something wrong in my patch?
sbernesto
(Ernesto Sanchez Benitez)
May 5, 2022, 7:28pm
2
hi,
try adding the languages in /admin/dark_lang/darklangconfig/ and see if that displays the list
guangyaw
(Guangyaw Li)
May 6, 2022, 1:12am
3
I did . My setting is as above.
uetuluk
(Utku Ege Tuluk)
May 6, 2022, 4:34am
4
@guangyaw Can you share whether there are any errors in the DevTools Console (for Chrome) when you select a language?
The language select button works as a form that sends the selected language as input. If it fails to submit the form, you will see an error there.
guangyaw
(Guangyaw Li)
May 6, 2022, 5:58am
5
No error . But warning and information as above.
uetuluk
(Utku Ege Tuluk)
May 6, 2022, 6:59am
6
I am sorry but I cannot replicate your issue.
Your darklangconfig
setting is correct and your plugin is also correct.
I have rewritten the plugin in this format, but I doubt it is a formatting issue.
from tutor import hooks
hooks.Filters.ENV_PATCHES.add_item(
(
"openedx-lms-common-settings",
'''FEATURES["SHOW_HEADER_LANGUAGE_SELECTOR"] = True'''
)
)
guangyaw
(Guangyaw Li)
May 9, 2022, 3:53am
7
Yes. Even if I change as your sample . The problem is the same .
Above is my plugins list for reference .