Is it possible to get the english content on the, for example, Spanish site if the Text for the specific language is not defined yet?

I do not mean a redirect! The English version should be displayed until the Spanish content has been inserted.

It would be great if someone has a Idea! Thanks!


You could choose which value to translate your content into using the |t($lang) filter based on some condition. You condition could be a lightswitch field on each entry saying whether it's been translated or not, or check if a content field is empty or not.

So something like

set lang = entry.lang

if entry.isTranslated == false {
   set lang = 'english'

{{ content|t(lang) }}
  • It would be really easy if this work, but it does not. But my theoretical Idea was like this. If Text Field is empty get English Text.
    – adsfgfhg
    Jan 29 '19 at 17:18

I think it have something to do with .handle('spanish') or .siteId('2'). I tried it but seems to be more complicated than I thought.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.