Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In my company, we use the Language fallback module a lot on recent projects. During work on the i18n support, we have found that it is quite useful for the end users to see the fallback information on the translation overview pages. Example for the menu link translations overview page:
Currently, there is no such information on the entity overview page:
In this particular example, the German (CH) fallback is actually used for the German (AT) language, however it is not reflected on the overview.
Can we implement this as a setting?
Comment | File | Size | Author |
---|---|---|---|
#3 | fallback_list_error.png | 98.87 KB | badrange |
#1 | UI-example-with-2444203-1-applied.png | 152.94 KB | Leksat |
#1 | entity_translation-show_fallback_on_overview-2444203-1.patch | 4.2 KB | Leksat |
Comments
Comment #1
Leksat CreditAttribution: Leksat commentedAttached patch provides the described functionality.
Also attached an example of the entity translations overview page with the patch applied.
Comment #2
dasjoAlso see leksat's blog post for background info & explanations:
http://www.amazeelabs.com/en/blog/total-language-fallback
Comment #3
badrange CreditAttribution: badrange at Wunder commentedI tried this patch in a project where the language fallback is handled by language_hierarchy, and the translate tab doesn't show correct information; all non-translated pages show fallback to the default language.
This patch should be fallback-module-agnostic.
I like the idea a lot, and hope it can get into entity translation!
Comment #4
badrange CreditAttribution: badrange at Wunder commentedI have now looked at the issue more closely, and I see that the issue might be in language_hierarchy, or at least assumptions made by that module.
If I force the if at line line 416 in
language_hierarchy/language_hierarchy.module
to always be false the translate tab looks correct. It also works if I log in as another user than user 1, that doesn't have the "Always fallback to default language" permission (part of language_hierarchy).I wonder what the correct status for this issue is now, I'll set it back to 'Needs review' even though I could also say 'RTBC'.
Comment #5
attiks CreditAttribution: attiks commentedWorks like a charm
Comment #6
plachCommitted and pushed, thanks.