I’m running Open edX on Tutor 21.0.2 (Ubuntu 24.04) and I’m looking to fully localize the learner interface into French, specifically the MFEs (Learning, Learner Dashboard, Authoring).
What I’ve already done:
LANGUAGE_CODE: fr in config.yml
tutor config save --set LOCALE=fr
tutor config save --set MFE_LEARNING_MICROFRONTEND_LANGUAGE=fr
tutor images build mfe (full build)
Result: The Learner Dashboard is in French, but the course content (Discussion, Progress, Dates tabs, buttons, etc.) remains in English.
Question: What is the correct method for integrating French translations into the MFEs on Tutor 21?
Thanks in advance!
By the way, how do you integrate openbadge.coop badges with Open edX?
Just based on my experience, the translation of OpenEdX to French is mostly good, but sometimes a bit clunky. There are odd strings here and there in the interface that are not translated.
I have also found that the translation to “fr” is often poor, and seems not really reviewed after the automatic translation. While I have corrected most of the strings in “fr-ca”, I did not want to correct the “fr” variation mostly because I don’t know all of the idiomatic expressions used in France which don’t make sense in Québec.
For switching language, we have implemented a language picker link, which basically changes the `openedx-language-preference` cookie. We have done this by adding a link in the footer:
I downloaded fr.json files from the openedx-translations repository and placed them in the Tutor MFE build folder. I also rebuilt the MFE image with --build-arg ATLAS_OPTIONS="--filter=fr" but French translations are still not appearing in the course interface.
Is there a correct way to include French translations in the MFE build on Tutor 21?
As far as I know, you don’t have to download any files manually. There are tons of translation files, and they are all managed automatically by tutor and ATLAS.
The main course tabs (Course, Progress, Dates, Discussion, Instructor) are all in English, as well as buttons (Resume course, Expand all, Previous, Next, Bookmark this page), the Progress page, the Dates page, and the entire Instructor Dashboard.
The course content itself displays correctly in French.
This seems to confirm that the Learning, Discussion, and Progress MFEs are not picking up French translations despite LANGUAGE_CODE: fr being set.
What happens if you switch your user’s language in your account page ?
Or when you set the openedx-language-preferencecookie for the site through your browser (and then reload the page).
I believe some of the language is automatically detected based on the browser’s language.
Can you also try to change your browser’s language and see if it changes the language of those ?
These are just to try to diagnose the issue, not suggesting it’s an actual solution.
Oh, another thing to try is to set your ATLAS_REVISION to main. This is a tutor config option. Once it is set, you need to rebuild the images (mainly openedx and mfe), and use the --no-cache option, i.e. tutor images build openedx mfe --no-cache and then restart your instance, because the translations are pulled at build time.
I can confirm that on our instance, they do get translated:
Setting your ATLAS_REVISION to main is risky, though, because if strings have been removed from the upstream set of strings, they won’t be translated on your named release instance anymore.
ATLAS_REVISION (default: "main" for Tutor Main, or "{{ OPENEDX_COMMON_VERSION }}" if a named release is used)
if you’re using a named release branch, {{ OPENEDX_COMMON_VERSION }} will default to the specific tag you’re using (eg release/ulmo.1) so to get the most up-to-date ulmo strings you’re better off setting this to release/ulmo, not to main. This is discussed more here - [Bug][Documentation] Translation: "main" is not default, but "release/ulmo.1" - #5 by brian.smith - but I’d refrain from using main if you’re on a named release branch.
Understanding that, we use main for our site because (at least historically), the translations done in named branches did not get propagated automatically to the future versions, so work had to be done over again in the next version.
This isn’t something that can currently (or should ever) be done on the Atlas side of things. I know @omar has been working with Transifex to improve this in a couple ways:
Shared translation memory between projects: We currently have a different transifex “project” for each release, so getting those to share “translation memory” and get identical translations for identical strings to make it into the other projects.
Transifex branching: This one I understand less, but it seems like it would remove some of the complexities that stem from having separate projects (each release would be a transifex branch instead).
There have also been changes that have made it so the “transifex AI” can mark translations as reviewed (I think based on them being reviewed in other projects?) That I also don’t have a full understanding of. I do know it has resulted in me needing to go in and fix a bunch of strings across a bunch of transifex projects after seeing 100+ failing PRs on the openedx-translations repo because broken strings marked as reviewed in one project made their way into others.