[GH-ISSUE #2719] Accept-Language header takes precedence over profile language setting #1685

Closed
opened 2026-02-27 11:18:33 +03:00 by kerem · 1 comment
Owner

Originally created by @PatTheMav on GitHub (Dec 27, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2719

After tinkering with the request headers for a bit, I've found that the Accept-Language (if it contains a supported and available translated language) will take precedence over the language actually setup in the modo boa profile.

Removing the header will revert this behaviour, which seems to have been introduced by the v2.0.0 interface (which also has the same issue).

Discussed in https://github.com/modoboa/modoboa/discussions/2519

Originally posted by PatTheMav May 20, 2022
Ever since I upgraded to v2.0.0 I got mixed translations in the interface. LANGUAGE_CODE is set to en-us in the settings file, the given profile is set to use "english".

Up to and including v1.1.7 this worked without issue, but with v2.0.0 I now got stray German labels and menu items in the legacy UI as well as the v2 admin interface. In the v2 admin interface I also get a lots of Untranslated en key found warnings in the console.

Is there an implicit localisation going on based on languages passed by browser headers (which will have German preferred over English as my OS is set to German) and my account settings not taking precedence?

Originally created by @PatTheMav on GitHub (Dec 27, 2022). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2719 After tinkering with the request headers for a bit, I've found that the `Accept-Language` (if it contains a supported and available translated language) will take precedence over the language actually setup in the modo boa profile. Removing the header will revert this behaviour, which seems to have been introduced by the v2.0.0 interface (which also has the same issue). ### Discussed in https://github.com/modoboa/modoboa/discussions/2519 <div type='discussions-op-text'> <sup>Originally posted by **PatTheMav** May 20, 2022</sup> Ever since I upgraded to v2.0.0 I got mixed translations in the interface. `LANGUAGE_CODE` is set to `en-us` in the settings file, the given profile is set to use "english". Up to and including v1.1.7 this worked without issue, but with v2.0.0 I now got stray German labels and menu items in the legacy UI as well as the v2 admin interface. In the v2 admin interface I also get a lots of `Untranslated en key found` warnings in the console. Is there an implicit localisation going on based on languages passed by browser headers (which will have German preferred over English as my OS is set to German) and my account settings not taking precedence?</div>
kerem 2026-02-27 11:18:33 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@moweerkat commented on GitHub (Feb 17, 2023):

https://github.com/modoboa/modoboa/pull/2788

<!-- gh-comment-id:1434436997 --> @moweerkat commented on GitHub (Feb 17, 2023): https://github.com/modoboa/modoboa/pull/2788
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1685
No description provided.