Does not correctly detect current content language

Created on 30 October 2024, 17 days ago

Problem/Motivation

The module doesn't work correctly on sites with separate content and interface text languages.

Steps to reproduce

1. Visit /admin/config/regional/language/detection and enable "Customize Content language detection to differ from Interface text language detection settings".
2. Choose different methods for "Interface text language detection" and "Content language detection" (an easy way to do this is pick "User" for interface text language, and "URL" for content language, then visit your user profile to choose an admin language).
3. Visit the front page and see that the interface text language gets chosen, instead of the content language.

Proposed resolution

Pass LanguageInterface::TYPE_CONTENT when requesting the current language. Sites for whom this module was working already (i.e. sites where the interface text language and the content language are the same) will notice no change.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ksenzee Washington state

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024