Order of languages overrides default language fallback

Created on 13 October 2022, about 2 years ago
Updated 7 February 2024, 11 months ago

Problem/Motivation

On a site with multiple languages, using English as the default, when changing the order of the languages and moving English below another non-default language, this order causes language fallbacks to prioritize order over default status. E.g. English and Chinese Simplified translation exist, when trying to access a non-existent translation via URL prefix, the Chinese Simplified translation is shown instead of the English original source.

Steps to reproduce

  1. Enable Content Translation and Language
  2. Go to/admin/config/regional/language
  3. Add Languages: Chinese, Simplified, Chinese, Traditional, Spanish
  4. Reorder Languages to be alphabetical (Chinese systems first, English, Spanish)
  5. Set English as Default
  6. Go to /admin/config/regional/language/detection
  7. Customize Content language detection to differ from Interface
  8. Enable URL
  9. Configure URL
  10. Add “en” path prefix for English
  11. Go to /admin/structure/taxonomy
  12. Edit Tags vocab and Enable translation
  13. Under Tags, add a couple terms
  14. Translate one term in Chinese, Simplified and change name to differ from source
  15. Go to Tags vocab listing, edit the prefix in the URL from “en” to “es”

Result:
The taxonomy term that has Chinese translation shows the name value from that translation.

Expectation:
I would’ve expected it to use the default language, English. But I assume it’s taking the first value in the existing translations list and displaying it instead? Is this how it’s supposed to work, or does anyone know of a core issue about it?

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

9.5

Component
Language system 

Last updated 2 days ago

  • Maintained by
  • 🇩🇪Germany @sun
Created by

🇺🇸United States brittany.huntzberry Arizona, US

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024