Language German incomplete or missing

We’re running OpenEDX (based on tutor, version 14.0.5) and are trying to consistently display at least the user experience (LMS) in German. During Quickstart, we’ve set the language to “de-de”:

The default language code for the platform [de-de] de-de

However, the page (normal LMS, URL learn.domain.tld) displays a weird mix of German and English:

Note the Next and Previous Buttons, Course, Help, before it says “Resume Course”, but other parts of the page are displayed in German.

Funnily enough, if we go to Studio and click on preview (URL preview.learn.domain.tld), everything is displayed correctly in German, so the translation itself exists:

Also, in the dropdown within the user profile (site preferences), German is not even available:

In the database, the preferred language is somehow set to German though:

mysql> select * from user_api_userpreference where `key` = "pref-lang";
+----+-----------+-------+---------+
| id | key       | value | user_id |
+----+-----------+-------+---------+
|  1 | pref-lang | de-de |       4 |
|  2 | pref-lang | de-de |       5 |
|  3 | pref-lang | de-de |       6 |
|  4 | pref-lang | de-de |       7 |
|  5 | pref-lang | de-de |       8 |
|  6 | pref-lang | de-de |       9 |
|  7 | pref-lang | de-de |      10 |
|  8 | pref-lang | de-de |      11 |
|  9 | pref-lang | de-de |      12 |
| 10 | pref-lang | de-de |      13 |
| 11 | pref-lang | de-de |      14 |
| 12 | pref-lang | de-de |      15 |
| 13 | pref-lang | de-de |      16 |
| 14 | pref-lang | de-de |      17 |
| 15 | pref-lang | de-de |      18 |
| 16 | pref-lang | de-de |      19 |
| 17 | pref-lang | de-de |      20 |
| 19 | pref-lang | de-de |      21 |
| 20 | pref-lang | de-de |      22 |
+----+-----------+-------+---------+
19 rows in set (0.00 sec)

Ideally, we’d like to simply hard code the language to German, as we don’t expect international users on the platform. If that’s not possible, we’d like to at least set the preferred language to German for everyone by default with the option to switch back and forth in the user account.

Any idea why LMS is behaving as it is?

You need to add the translations from Transfixed manually since the Learning MFE does not come with German translations.

You can see that it is already translated here: https://www.transifex.com/open-edx/edx-platform/frontend-app-learning/

The preview works since those translations come from the LMS rather than Learning MFE.

You can refer to this guide for adding the translation files to MFE: GitHub - overhangio/tutor-mfe

1 Like

Dear @uetuluk, thank you so much for your reply, that makes a lot of sense.

I’ve downloaded the de_DE JSON files from here (learning), and here (account), and placed them as follows:

# config printroot is ~/.local/share/tutor/
#:~/.local/share/tutor/env/plugins/mfe/build/mfe/i18n$ ls
account  i18n-merge.js  learning
#:~/.local/share/tutor/env/plugins/mfe/build/mfe/i18n$ ls account/
de_DE.json
#:~/.local/share/tutor/env/plugins/mfe/build/mfe/i18n$ ls learning/
de_DE.json

After running

tutor images build mfe
tutor local start -d

It still stays English and the option “German” (nor Deutsch obviously) is not available in the menu. I also tried naming the files de-de.json as de-de is used otherwise throughout, but it doesn’t help either. Am I missing something or did I name the folders / files incorrectly?

Thanks!

Sorry, it was a little more involved than I thought.

German is not supported at all, so you will have to change the code.

Here is a topic about it: Tutor MFE: Custom translation does not work for Vietnamese

In case anyone finds this thread and has the same problem, I did find a solution that should be tutor compatible. It is documented in detail here: Problems applying Customised MFE libraries (eg "frontend-platform") to a production open edx platform (using "tutor local") - #12 by Wasabi

1 Like