I have a Drupal 9 site. The default language is English, second language is German. I keep having problems with translations in the backend. Lots of field labels and other text shows up in English, even though the URL contains "/de/" (German).
Most simple use case:
- The "simple page" has a field "teaser text". If I edit this field definition, there is a translation tab. I verified that the English language contains the English label and the German translation contains the German label.
- Caches have been cleared (drush cr)
- If I create a simple page or edit one and the URL still contains the prefix "/de", the field label is shown in English.
- It's not a conflict with UI translation. If I enter the English label under "admin/config/regional/translate" nothing is shown.
Now for the interesting part:
- I go to "admin/config/regional/content-language" and save that page without changing anything.
- I go back to creating/editing a simple page and the label is displayed correctly.
- Do another "drush cr" and go back, and it's wrong again.
I'm happy to debug this further, but I'd be grateful for some pointers what might be causing this. There are numerous modules activated, contrib and custom. What actually happens on the "Content language" page, when it is submitted?
Update: The option "Customize Content language detection to differ from Interface text language detection settings" is not enabled. Currently, the content is not multilingual. We simple have English as default and development language, but the interface needs to be in German for the end users.
The bug linked in the comments sounds a lot like our problem, though. I have to say it's absolute beyond me how such an issue can not be fixed for YEARS. :-( I will try the patch and see what happens.
Update 2: I tried the patch from the issue and it works! Suddenly, field labels appear in German. Thanks a lot for pointing to the issue, 4uk4!