All MFE pages hardcode the page language (<html lang="en-us")

and this affects tasks that depend on the browser language, such as automatic translation. How can this be fixed?

Problem:

When you change the website language (e.g., through the account page), the lang attribute in the HTML doesn’t change accordingly. Logically, this is incorrect, and it also affects language-dependent tasks, such as automatic translation extensions.

There are many MFEs so I don’t know how to effectively fix them.

I hope the front-end development team can look into this issue.

@brian.smith could you take a look at this?

lang="en-us" does appear to be hardcoded into index.html for both frontend-app-learner-dashboard and frontend-app-learning

I’ll need to do a bit more digging to see what a better way to handle this would be.

Hum, is this new ?

It is the first time I notice this, and it affects the language of our CookieYes banner

The auto-translation works based on the lang attributes in the tag. In case your website does not have a lang attribute, you can manually assign the language by following the steps below.

I never noticed this before, but it’s possible it has been there for a while.

For reference (and further discussion), there is an issue that tracks this problem:

I thing it’s significant enough for us to at least attempt to fix it by Willow (and maybe backport to Verawood, depending on how it goes).