# Language settings unconsistency

**URL:** <https://discuss.openedx.org/t/language-settings-unconsistency/8466>\
**Category:** i18n\
**Tags:** translation\
**Created:** [October 10, 2022, 1:14pm UTC](https://discuss.openedx.org/t/language-settings-unconsistency/8466 "2022-10-10T13:14:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evgen\_Dyudyunov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/evgen_dyudyunov/32/3702_2.png) [@Evgen\_Dyudyunov](https://discuss.openedx.org/u/Evgen_Dyudyunov)\
**Post date:** [October 10, 2022, 1:14pm UTC](https://discuss.openedx.org/t/language-settings-unconsistency/8466/1 "2022-10-10T13:14:55Z")

</div>

The Account MFE provides the ability to change the platform language using the hardcoded options (source is [here](https://github.com/openedx/frontend-app-account/blob/master/src/account-settings/site-language/constants.js)):

 ![Screenshot 2022-10-10 at 15.19.12](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/e/ecc910d3eefd45b8a517fa4f5614056b95a0aa16.jpeg)

On other hand, the legacy frontend (all the non-MFE parts) including the header language selector uses the Dark Lang config to define languages users could use (aka Released Languages).

Furthermore, as @regis described [in this how-to](https://discuss.overhang.io/t/howto-enable-multiple-languages-for-your-open-edx-platform/140) the DarkLang middleware filters the user’s browser preferred languages so the anonymous user will see a translated version of the platform only if their browser’s preferred language (the `Accept-Language` header) will be presented in the dark lang released languages list.

 ![Screenshot 2022-10-10 at 14.59.14](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/c/c999318b72cdf98cf1b80e5bee39bc275f86ba32.png)  
 ![Screenshot 2022-10-10 at 14.57.09](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/1/132aa19f6907e6829f3679bb41b2adad8c0906d8.jpeg)

Now the problem part.

If to choose the language which was not added to dark lang released languages:

- language cookies are set and MFE/legacy frontends are translated correctly
- BUT the header language selector doesn’t have the option we’ve used, so it shows the default (English):

 ![Screenshot 2022-10-10 at 15.01.30](https://us1.discourse-cdn.com/flex020/uploads/openedx/original/2X/c/c0ee01d20560ed7bc3321791cfea28c4de42bac3.png)

* * *

My idea:

- add the API endpoint to get a list of released languages (pretty easy). I suspect that I could update the existing endpoint, but I didn’t search for it yet. Any hints are welcome here.
- filter MFEs supported languages using the received released languages list and show only those options for selection on the account page

Pros:

- language selectors are consistent
- more control over the platform configuration (e.g. I don’t want to have partially translated language X available for learners, so I can configure it in the site admin)

Why don’t I just implement it?

- I don’t know what plans for dark lang does edx have - will it be still used? removed?
- Why does the hardcoded list of languages in the Account MFE include only these languages? What are the plans for extending that list?

* * *

I will be happy to fix this issue 🙂

---

<div class="post-metadata">

**Author:** ![brian.smith](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/brian.smith/32/4259_2.png) [@brian.smith](https://discuss.openedx.org/u/brian.smith)\
**Post date:** [November 9, 2022, 3:14pm UTC](https://discuss.openedx.org/t/language-settings-unconsistency/8466/2 "2022-11-09T15:14:43Z")

</div>

@Evgen_Dyudyunov thanks for the insightful post! You bring up a lot of good points, it seems any solution we implement should:

- Ensure a consistent source of truth for available languages
  - You mentioned an API for this, that has also been discussed [here](https://github.com/openedx/platform-roadmap/issues/205#issuecomment-1276402976), I haven’t fully thought through the implementation details of that, and I’m not sure how that could/would fit in with [atlas](https://github.com/openedx/openedx-atlas) and the [OEP-58 plans for atlas](https://github.com/openedx/open-edx-proposals/pull/367/files#diff-8f82ad4b67d3a4a5183cd30462c791e920662245f6c337e5d377357f024a9607R178-R191)

- Ensure available languages work system wide
  - When a language is selected, the setting should be respected globally
  - Does this make sense with different roles? Should admins have access to more/different languages than learners?

There are definitely more things to think through with this, considering system/browser language settings and site overrides, as well as how new languages are added ([the previously linked comment](https://github.com/openedx/platform-roadmap/issues/205#issuecomment-1276402976) mentions overrides and custom locales)

I’m looking forward to doing whatever it takes to turn these thoughts and ideas into action items!

---

<div class="post-metadata">

**Author:** ![Evgen\_Dyudyunov](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.openedx.org/evgen_dyudyunov/32/3702_2.png) [@Evgen\_Dyudyunov](https://discuss.openedx.org/u/Evgen_Dyudyunov)\
**Post date:** [April 27, 2023, 12:52pm UTC](https://discuss.openedx.org/t/language-settings-unconsistency/8466/3 "2023-04-27T12:52:47Z")

</div>

Hi!

I’m still interested in updates on the issue 🙂

I saw the [related issue](https://github.com/openedx/platform-roadmap/issues/205) was moved from the backlog to the “In Progress” state on Dec 2022 but there were no updates since then.

@brian.smith @arbrandes could you share the actual issue state and relevant updates if any?
