fix: integrate RTL handling on locale changes (AU-2863)#48
Open
fix: integrate RTL handling on locale changes (AU-2863)#48
Conversation
There was a problem hiding this comment.
Pull request overview
Integrates the platform RTL direction handler into the Learning MFE shell so the document direction is set correctly on initial load and when the user changes locale.
Changes:
- Import
handleRtlandLOCALE_CHANGEDfrom@edx/frontend-platform/i18n. - Subscribe to
LOCALE_CHANGEDto re-apply RTL/LTR direction on dynamic language switches. - Call
handleRtl()onAPP_READYbefore rendering the React app.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
nsprenkle
reviewed
Apr 23, 2026
Member
nsprenkle
left a comment
There was a problem hiding this comment.
In all my testing, the Learning MFE actually already applies the rtl directive correctly when the language is RTL, which is also what handleRtl does.
<html lang="en-us" dir="rtl" data-paragon-theme-variant="light" class="">
...Are you able to demonstrate that any cases are fixed by adding the handleRtl function that we don't already have covered?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title
AU-2863: Integrate RTL handling on locale changes in Learning MFE
Description
Problem
Arabic and other RTL-language course content displays with left-to-right text direction in the Learning MFE shell, despite correct rendering in other parts of the platform (Studio).
Solution
Integrated the platform's native
handleRtl()function from@edx/frontend-platform/i18nto:Changes
handleRtlandLOCALE_CHANGEDfrom frontend-platform i18n utilitiesLOCALE_CHANGEDevent to handle dynamic language switcheshandleRtl()during app startup before renderingScope