Fallback for translations #18697
-
Beta Was this translation helpful? Give feedback.
Answered by
brandonkelly
Apr 22, 2026
Replies: 2 comments 3 replies
-
|
You could do an ad hoc version of this yourself by adding a “Use German content” Lightswitch field to your field layout. Then from your template, you could swap out the entry with the German one when the field is enabled. {% if entry.useGermanContent and entry.site.handle != 'de' %}
{% set entry = entry.localized.site('de').one() ?? entry %}
{% endif %} |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
That would be a very nice Extra to add into Craft CMS |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment



You could pull that off with a custom module that listens to the
Element::EVENT_DEFINE_KEYWORDSevent: