# Customize translation in LMS and CMS

**URL:** <https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042>\
**Category:** i18n\
**Tags:** translation\
**Created:** [January 6, 2024, 6:11am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042 "2024-01-06T06:11:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arthur378](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arthur378/32/6293_2.png) [@Arthur378](https://discuss.openedx.org/u/Arthur378)\
**Post date:** [January 6, 2024, 6:11am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/1 "2024-01-06T06:11:15Z")

</div>

Hi How can I change the Persian translation of some words in LMS and CMS in the simplest way

---

<div class="post-metadata">

**Author:** ![FatemeKhodayari](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/fatemekhodayari/32/5614_2.png) [@FatemeKhodayari](https://discuss.openedx.org/u/FatemeKhodayari)\
**Post date:** [January 6, 2024, 3:07pm UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/2 "2024-01-06T15:07:52Z")

</div>

Hi. Please specify your environment and tell us whether you’re using tutor, devstack or any other way of running the platform. Also please give more information about the translation issue. Is it from the MFE side or LMS / CMS?

---

<div class="post-metadata">

**Author:** ![Arthur378](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arthur378/32/6293_2.png) [@Arthur378](https://discuss.openedx.org/u/Arthur378)\
**Post date:** [January 8, 2024, 6:38am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/3 "2024-01-08T06:38:50Z")

</div>

I run the tutor on wsl with the Indigo theme and the problem I have, for example,I changed the language to persian but the dashboard page of the CMS is completely English, even in the courses I go to, it is 90% Persian, but some words are not translated. how should i do?

 ![Screenshot (33)](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/3/372cee4e3fecba7ead030b40deaeebdf52606eb8.png)

---

<div class="post-metadata">

**Author:** ![regis](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/regis/32/2640_2.png) [@regis](https://discuss.openedx.org/u/regis)\
**Post date:** [January 8, 2024, 8:45am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/4 "2024-01-08T08:45:30Z")

</div>

Hi! Did you check the documentation? [Configuration and customisation — Tutor documentation](https://docs.tutor.edly.io/configuration.html#adding-custom-translations)

---

<div class="post-metadata">

**Author:** ![Arthur378](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arthur378/32/6293_2.png) [@Arthur378](https://discuss.openedx.org/u/Arthur378)\
**Post date:** [January 8, 2024, 8:59am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/5 "2024-01-08T08:59:41Z")

</div>

hi @regis For example, to translate the word “My Course” in this page , I created a file with the name and format “django.po” in this directory /env/build/openedx/locale/fa/LC\_MESSAGES and I filled the django file with these commands

```auto
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8"

msgid "My Course"
msgstr "دوره های من"

```

Then re-build the openedx Docker image with this command

```auto
tutor images build openedx
tutor local launch

```

But there was no change, am I missing something or am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![Anh\_Vu\_Nguy\_n](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/anh_vu_nguy_n/32/1740_2.png) [@Anh\_Vu\_Nguy\_n](https://discuss.openedx.org/u/Anh_Vu_Nguy_n)\
**Post date:** [January 8, 2024, 9:04am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/6 "2024-01-08T09:04:01Z")

</div>

The page you mentioned is in the front-end side (MFE)  
You should check [this doc](https://github.com/overhangio/tutor-mfe?tab=readme-ov-file#adding-custom-translations-to-your-mfes) instead.

---

<div class="post-metadata">

**Author:** ![Arthur378](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arthur378/32/6293_2.png) [@Arthur378](https://discuss.openedx.org/u/Arthur378)\
**Post date:** [January 8, 2024, 9:56am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/7 "2024-01-08T09:56:31Z")

</div>

Thank you @Anh_Vu_Nguy_n ٬, but I can’t find the ID of the part I want to translate in source , for example, the word “My Course” in the picture above

---

<div class="post-metadata">

**Author:** ![FatemeKhodayari](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/fatemekhodayari/32/5614_2.png) [@FatemeKhodayari](https://discuss.openedx.org/u/FatemeKhodayari)\
**Post date:** [January 9, 2024, 6:53am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/8 "2024-01-09T06:53:13Z")

</div>

Have you tried changing language from `https://your-lms.com/update_lang`? It’s possible that your lang preference is still set to another language (English in this case I guess). For Persian you can try both fa and fa-ir but my suggestion would be fa-ir.

---

<div class="post-metadata">

**Author:** ![Arthur378](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arthur378/32/6293_2.png) [@Arthur378](https://discuss.openedx.org/u/Arthur378)\
**Post date:** [January 9, 2024, 7:45am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/9 "2024-01-09T07:45:38Z")

</div>

Hello @FatemeKhodayari ,I selected the persian language before launching the tutor and after that I changed account language to persian , but dashboard page still in English. Here, as you said, I went and type fa and fa\_IR, but nothing happened and dashboard still english.

---

<div class="post-metadata">

**Author:** ![FatemeKhodayari](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/fatemekhodayari/32/5614_2.png) [@FatemeKhodayari](https://discuss.openedx.org/u/FatemeKhodayari)\
**Post date:** [January 9, 2024, 8:08am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/10 "2024-01-09T08:08:09Z")

</div>

Based on my own experience, the new learner dashboard MFE is not currently supporting Persian (haven’t checked other languages yet). So the dashboard remains LTR and English even if you set your language to Persian. Check the learning MFE please. In Tutor v17 (Quince release), the learning MFE is displayed in RTL and supports Persian translations when your language is set to `fa-ir`.

---

<div class="post-metadata">

**Author:** ![Anh\_Vu\_Nguy\_n](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/anh_vu_nguy_n/32/1740_2.png) [@Anh\_Vu\_Nguy\_n](https://discuss.openedx.org/u/Anh_Vu_Nguy_n)\
**Post date:** [January 9, 2024, 8:10am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/11 "2024-01-09T08:10:01Z")

</div>

You can find the key at i18n folder of MFE projects or transiflex.  
But I think for Dashboard MFE fa or fa\_ir [is not there](https://github.com/openedx/frontend-app-learner-dashboard/blob/open-release/quince.1/src/i18n/index.js)  
If Dashboard MFE is enabled you can go to Account settings \> Site language to set your language.  
But the fact that Dashboard MFE is enabled by default but they’ve not implemented the language dropdown, making it really inconvenient.

---

<div class="post-metadata">

**Author:** ![Arthur378](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arthur378/32/6293_2.png) [@Arthur378](https://discuss.openedx.org/u/Arthur378)\
**Post date:** [January 9, 2024, 11:40am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/12 "2024-01-09T11:40:34Z")

</div>

I changed the language of the site, most of the words were translated except the learning-dashboard page and yes fa isnt there how can I add it or translate the words Manually

---

<div class="post-metadata">

**Author:** ![Anh\_Vu\_Nguy\_n](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/anh_vu_nguy_n/32/1740_2.png) [@Anh\_Vu\_Nguy\_n](https://discuss.openedx.org/u/Anh_Vu_Nguy_n)\
**Post date:** [January 9, 2024, 12:11pm UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/13 "2024-01-09T12:11:09Z")

</div>

You can’t do anything about it unless you want to run a [custom fork](https://github.com/overhangio/tutor-mfe?tab=readme-ov-file#adding-new-mfes) and refer to [this PR](https://github.com/openedx/frontend-app-learning/pull/989) to add an unsupported language.

---

<div class="post-metadata">

**Author:** ![FatemeKhodayari](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/fatemekhodayari/32/5614_2.png) [@FatemeKhodayari](https://discuss.openedx.org/u/FatemeKhodayari)\
**Post date:** [January 13, 2024, 9:10am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/14 "2024-01-13T09:10:53Z")

</div>

As this is an issue I’m facing as well, I added translations for Persian [here](https://github.com/openedx/frontend-app-learner-dashboard/issues/270).

@Arthur378 not sure if you solved your issue or not, but in case you’re in a hurry, you can apply [these changes](https://github.com/openedx/frontend-app-learner-dashboard/pull/271) to a fork of this MFE and use a custom MFE plugin to have the dashboard in RTL and with Persian support.

---

<div class="post-metadata">

**Author:** ![Arthur378](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arthur378/32/6293_2.png) [@Arthur378](https://discuss.openedx.org/u/Arthur378)\
**Post date:** [January 14, 2024, 5:17am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/15 "2024-01-14T05:17:51Z")

</div>

tnx @FatemeKhodayari how can I add it to my edx?  
I forked the file and applied the changes, what should I do now?

---

<div class="post-metadata">

**Author:** ![FatemeKhodayari](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/fatemekhodayari/32/5614_2.png) [@FatemeKhodayari](https://discuss.openedx.org/u/FatemeKhodayari)\
**Post date:** [January 14, 2024, 6:29am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/16 "2024-01-14T06:29:25Z")

</div>

These are the steps to having a customized MFE in Tutor v17

1. Fork the repository of the MFE (frontend-app-learner-dashboard in this case)

2. Apply your changes and push them to your fork

3. Add a tutor plugin in `.local/share/tutor-plugins/dashboard.py`

```auto
from tutormfe.hooks import MFE_APPS

@MFE_APPS.add()
def _add_my_mfe(mfes):
    mfes["learner-dashboard"] = {
        "repository": "https://github.com/your-fork-of-learner-dashboard.git",
        "port": 1996,
        "version": "my-custom-branch-or-tag-or-commit", # optional, will default to the Open edX current tag.
    }
    return mfes

```

1. Enable the plugin by running `tutor plugins enable dashboard`

2. Rebuild the mfe image by running `tutor images build mfe`

3. Launch and check

---

<div class="post-metadata">

**Author:** ![FatemeKhodayari](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/fatemekhodayari/32/5614_2.png) [@FatemeKhodayari](https://discuss.openedx.org/u/FatemeKhodayari)\
**Post date:** [January 14, 2024, 7:38am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/18 "2024-01-14T07:38:14Z")

</div>

The default directory for tutor is `.local/share/tutor` as you have as well. To make tutor see your plugins, you should add them in the `tutor-plugins` directory on the same level with tutor root directory. So by default the tutor plugins directory will be `.local/share/tutor-plugins/`. As this directory isn’t created by default, you should add it yourself. For better understanding the tutor plugins structure and process read [the docs](https://docs.tutor.edly.io/tutorials/plugin.html#plugin-development-tutorial) please.

---

<div class="post-metadata">

**Author:** ![Arthur378](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arthur378/32/6293_2.png) [@Arthur378](https://discuss.openedx.org/u/Arthur378)\
**Post date:** [January 14, 2024, 8:43am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/19 "2024-01-14T08:43:07Z")

</div>

what is the problem?

```auto
root@HP-OMEN-17:~/.local/share/tutor-plugins# ls
__pycache__ dashboard.py
root@HP-OMEN-17:~/.local/share/tutor-plugins# tutor plugins enable dashboard
⚠️ You are running Tutor as root. This is strongly not recommended. If you are doing this in order to access the Docker daemon, you should instead add your user to the 'docker' group. (see https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user)
Error applying action: func=<function discover_module.<locals>.load at 0x7f89e6205ea0> contexts=['plugins']'
Traceback (most recent call last):
  File "/usr/local/bin/tutor", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/tutor/commands/cli.py", line 27, in main
    cli() # pylint: disable=no-value-for-parameter
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/tutor/commands/plugins.py", line 142, in enable
    plugins.load(plugin)
  File "/usr/local/lib/python3.10/dist-packages/tutor/plugins/ __init__.py", line 111, in load
    hooks.Actions.PLUGIN_LOADED.do(name)
  File "/usr/local/lib/python3.10/dist-packages/tutor/core/hooks/actions.py", line 116, in do
    self.do_from_context(None, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/tutor/core/hooks/actions.py", line 135, in do_from_context
    callback.do(
  File "/usr/local/lib/python3.10/dist-packages/tutor/core/hooks/actions.py", line 36, in do
    self.func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/tutor/plugins/v1.py", line 56, in load
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/root/.local/share/tutor-plugins/dashboard.py", line 1, in <module>
    @MFE_APPS.add()
NameError: name 'MFE_APPS' is not defined

```

---

<div class="post-metadata">

**Author:** ![FatemeKhodayari](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/fatemekhodayari/32/5614_2.png) [@FatemeKhodayari](https://discuss.openedx.org/u/FatemeKhodayari)\
**Post date:** [January 14, 2024, 8:47am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/20 "2024-01-14T08:47:10Z")

</div>

1. You must have tutor-mfe installed
2. You must have mfe plugin enabled and installed
3. Do not run tutor as root as your log is also saying

---

<div class="post-metadata">

**Author:** ![Arthur378](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/arthur378/32/6293_2.png) [@Arthur378](https://discuss.openedx.org/u/Arthur378)\
**Post date:** [January 14, 2024, 11:14am UTC](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042/21 "2024-01-14T11:14:31Z")

</div>

I enabled mfe and dashboard, but it still gives this error when building:

```auto
Building image docker.io/overhangio/openedx-mfe:17.0.0-indigo
docker buildx build --tag=docker.io/overhangio/openedx-mfe:17.0.0-indigo --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx-mfe:17.0.0-indigo-cache /root/.local/share/tutor/env/plugins/mfe/build/mfe
[+] Building 5.3s (31/172) docker:default
 => [internal] load .dockerignore 0.0s
 => => transferring context: 2B 0.0s
 => [internal] load build definition from Dockerfile 0.0s
 => => transferring dockerfile: 25.69kB 0.0s
 => resolve image config for docker.io/docker/dockerfile:1 1.3s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfc 0.0s
 => [internal] load metadata for docker.io/library/node:18.19.0-bullseye-slim 1.0s
 => [internal] load metadata for docker.io/library/caddy:2.7.4 0.0s
 => importing cache manifest from docker.io/overhangio/openedx-mfe:17.0.0-indigo 2.8s
 => git://github.com/openedx/frontend-app-profile.git#open-release/quince.1 1.4s
 => git://github.com/openedx/frontend-app-ora-grading.git#open-release/quince.1 1.3s
 => git://github.com/openedx/frontend-app-learning.git#open-release/quince.1 1.3s
 => https://github.com/Arthur378/frontend-app-learner-dashboard.git# 2.7s
 => [base 1/4] FROM docker.io/library/node:18.19.0-bullseye-slim@sha256:f06f9ff9 0.0s
 => [internal] load build context 0.0s
 => => transferring context: 151B 0.0s
 => git://github.com/openedx/frontend-app-course-authoring.git#open-release/quin 1.4s
 => git://github.com/openedx/frontend-app-account.git#open-release/quince.1 1.4s
 => git://github.com/openedx/frontend-app-communications.git#open-release/quince 1.2s
 => git://github.com/openedx/frontend-app-gradebook.git#open-release/quince.1 1.3s
 => git://github.com/openedx/frontend-app-authn.git#open-release/quince.1 1.4s
 => [production 1/12] FROM docker.io/library/caddy:2.7.4 0.0s
 => git://github.com/openedx/frontend-app-discussions.git#open-release/quince.1 1.3s
 => CACHED [base 2/4] RUN apt update && apt install -y git gcc libgl1 libx 0.0s
 => CACHED [base 3/4] RUN mkdir -p /openedx/app /openedx/env 0.0s
 => CACHED [base 4/4] WORKDIR /openedx/app 0.0s
 => [learner-dashboard-git 1/1] ADD --keep-git-dir=true https://github.com/Arthu 0.0s
 => [learner-dashboard-src 1/1] COPY --from=learner-dashboard-git /openedx/app / 0.0s
 => ERROR [learner-dashboard-common 1/5] COPY --from=learner-dashboard-src /pack 0.0s
 => ERROR [learner-dashboard-common 2/5] COPY --from=learner-dashboard-src /pack 0.0s
 => CACHED [i18n 1/3] COPY ./i18n /openedx/i18n 0.0s
 => CACHED [i18n 2/3] RUN chmod a+x /openedx/i18n/*.js 0.0s
 => CACHED [i18n 3/3] RUN echo "copying i18n data" && mkdir -p /openedx/i18n/a 0.0s
 => CANCELED [learner-dashboard-i18n 1/5] COPY --from=learner-dashboard-src / /o 0.0s
------
 > [learner-dashboard-common 1/5] COPY --from=learner-dashboard-src /package.json /openedx/app/package.json:
------
------
 > [learner-dashboard-common 2/5] COPY --from=learner-dashboard-src /package-lock.json /openedx/app/package-lock.json:
------
Dockerfile:395
--------------------
 393 | FROM base AS learner-dashboard-common
 394 | COPY --from=learner-dashboard-src /package.json /openedx/app/package.json
 395 | >>> COPY --from=learner-dashboard-src /package-lock.json /openedx/app/package-lock.json
 396 | ARG NPM_REGISTRY=https://registry.npmjs.org/
 397 |
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref cf12243e-56e4-4327-abdd-d8ab1336d21f::1l8it7ucwmvnicrpaj2blw01d: "/package-lock.json": not found
Error: Command failed with status 1: docker buildx build --tag=docker.io/overhangio/openedx-mfe:17.0.0-indigo --output=type=docker --cache-from=type=registry,ref=docker.io/overhangio/openedx-mfe:17.0.0-indigo-cache /root/.local/share/tutor/env/plugins/mfe/build/mfe

```

[Next page](https://discuss.openedx.org/t/customize-translation-in-lms-and-cms/12042.md?page=2)
