Skip to main content

OL Open edX Auto Select Language

An Open edX plugin to auto select the Open edX platform language based on the course language.

Purpose

Auto select the Open edX platform language based on the course language. When enabled, users will see the static site content in the course’s configured language.

Version Compatibility

For this plugin’s compatibility with Open edX, see the Open edX Release Compatibility table.

Setup

For detailed installation instructions, please refer to the plugin installation guide.

Installation required in:

  • Studio (CMS)

  • LMS

Configuration

  • Add the following configuration values to the config file in Open edX. For any release after Juniper, that config file is /edx/etc/lms.yml and /edx/etc/cms.yml. If you’re using private.py, add these values to lms/envs/private.py and cms/envs/private.py. These should be added to the top level. Ask a fellow developer for these values.

    # Enable auto language selection
    ENABLE_AUTO_LANGUAGE_SELECTION: true
  • For Tutor installations, these values can also be managed through a custom Tutor plugin.

Auto Language Selection

The plugin includes an auto language selection feature that automatically sets the user’s language preference based on the course language. When enabled, users will see the static site content in the course’s configured language.

To enable auto language selection:

  1. Set ENABLE_AUTO_LANGUAGE_SELECTION to true in your settings.

  2. Set SHARED_COOKIE_DOMAIN to your domain (e.g., .local.openedx.io for local tutor setup) to allow cookies to be shared between LMS and CMS.

How it works:

  • LMS: The CourseLanguageCookieMiddleware automatically detects course URLs and sets the language preference based on the course’s configured language.

  • CMS: The CourseLanguageCookieResetMiddleware ensures Studio always uses English for the authoring interface.

  • Admin areas: Admin URLs (/admin, /sysadmin, instructor dashboards) are forced to use English regardless of course language.

MFE Integration

To make auto language selection work with Micro-Frontends (MFEs), you need to use a custom Footer component that handles language detection and switching.

Setup:

  1. Use the Footer component from src/bridge/settings/openedx/mfe/slot_config/Footer.jsx in the ol-infrastructure repository.

  2. Enable auto language selection in each MFE by adding the following to their .env.development file:

    ENABLE_AUTO_LANGUAGE_SELECTION="true"
  3. This custom Footer component: - Detects the current course context in MFEs - Automatically switches the MFE language based on the course’s configured language - Ensures consistent language experience across the platform

  4. Configure your MFE slot overrides to use this custom Footer component instead of the default one.

Note: The custom Footer is required because MFEs run as separate applications and need their own mechanism to detect and respond to course language settings. The environment variable must be set in each MFE’s configuration for the feature to work properly.

Video Transcript Languages

When ENABLE_AUTO_LANGUAGE_SELECTION is true, the LMS video player offers only the course-language transcript; its language menu is not rendered.

This is implemented as a VerticalBlockChildRenderStarted pipeline step (org.openedx.learning.vertical_block_child.render.started.v1) that narrows the language list each video block hands to the player. Transcript downloads, the available_translations handler, the mobile student_view_data payload and Studio are unaffected, so course teams continue to manage every uploaded language.

The course language is read from the course, not from the transcript the player resolved. If a video has no transcript in the course language, the player keeps its full language menu rather than being pinned to whichever transcript the platform happened to fall back to.

Videos rendered outside a vertical – a direct render_xblock on a video usage key, or the public video sharing page – are not covered, because the filter only fires for children of a vertical block.

License

The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.

Please see LICENSE.txt for details.

Metadata

Release files for ol-openedx-auto-select-language 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ol-openedx-auto-select-language 0.3.0
File Size Uploaded Provenance Actions
ol_openedx_auto_select_language-0.3.0.tar.gz 9.6 kB Without provenance Details for ol_openedx_auto_select_language-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ol-openedx-auto-select-language 0.3.0
File Interpreter ABI Platform Actions
ol_openedx_auto_select_language-0.3.0-py3-none-any.whl Python 3 none any Details for ol_openedx_auto_select_language-0.3.0-py3-none-any.whl

Total release size: 24.3 kB

Release files / ol_openedx_auto_select_language-0.3.0.tar.gz

Download URL ol_openedx_auto_select_language-0.3.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
93296466577b6c5a6482039ad3767944ec54fce791369f484fe821f069856fa6
BLAKE2b-256 checksum
How to use checksums
07cc967ec63ceea766e688df74fbc0372c79231a74b765cb2a69954fecda0d7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Release files / ol_openedx_auto_select_language-0.3.0-py3-none-any.whl

Download URL ol_openedx_auto_select_language-0.3.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd35ef9c1e49556e8771985bbd192b91cd56bc9c14774c3a51081500bbdce138
BLAKE2b-256 checksum
How to use checksums
e35e2f5acdc9f6eb6d986b267d16c41e2d1d4b18c6fe39566c0e93aec77dce00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for ol-openedx-auto-select-language 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page