We are in the process of supporting multiple languages on our Open edX site. Accordingly, we have the desired languages added to the dark lang config and have the
SHOW_HEADER_LANGUAGE_SELECTOR setting set to true in our lms.yml file. Everything is working properly in terms of a language selector appearing in the header that a student can interact with to change the display language. However, we’d like to be able to have the language code appear in the URLs.
For example, the Demo Course URL is like this by default (even if viewing in a language that is not the default site language such as Spanish): https://our.openedxexample.org/courses/course-v1:edX+DemoX+Demo_Course/about where we’d like it to appear like: https://our.openedxexample.org/es/courses/course-v1:edX+DemoX+Demo_Course/about or https://our.openedxexample.org/courses/course-v1:edX+DemoX+Demo_Course/about?lang-code=es
It seems that the language is handled by a cookie called
openedx-language-preference rather than using language codes in the URL, but the latter is preferable for us so we can send links and advertise our courses in target languages and have potential learners come to the site on a specific language.