Skip to content

Detect language on server side instead of JS

Maxime Besson requested to merge fix-email-lang-3204 into v2.0

This MR fixes #3204 (closed) and preserves behavior from #2899 (closed) by computing the user's preferred language on the server side. Logic is still the same:

  • first, consider llnglanguage
  • then, Accept-Language
  • finally, fallback to "languages" / english

Moving everything to server-side avoids having duplicate logic (in two different programming languages), which could have been a future source of bugs.

Edited by Maxime Besson

Merge request reports