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.

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.2.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.2.0
File Size Uploaded Provenance Actions
ol_openedx_auto_select_language-0.2.0.tar.gz 7.8 kB Without provenance Details for ol_openedx_auto_select_language-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 20.6 kB

Release files / ol_openedx_auto_select_language-0.2.0.tar.gz

Download URL ol_openedx_auto_select_language-0.2.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
42349848f346dd8366ff635fecdcd755c0d14c3de5c4f80ae60b717a6c9dc438
BLAKE2b-256 checksum
How to use checksums
10bddcda882e9845bc59faac0c6340195cbe1fcda7567d0a3ec812f026ed1fba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL ol_openedx_auto_select_language-0.2.0-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e79cf1caa85f05ac4d8d35785a3c0d3b51a8af2d16a4bddc0f9d73bef8b7fa06
BLAKE2b-256 checksum
How to use checksums
224d02b7eaced0b2b1ee65695fb72c309d884ddc6873b11d36de837710c22799
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for ol-openedx-auto-select-language 0.2.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