[Polylang] How to force Bricks to use the template in default language, when it isn't translated?

Hi, when you use Bricks along with Polylang, you must enable translations for the Bricks Templates post type. You then set the display conditions for the default language only and Bricks will then automatically pick up the translated template in the language that it being used. That is all fine.

Problem is, when you don’t translate a certain template - then it simply won’t render.

So my question is: is there a way to make an (optional) fallback and force Bricks to use the default language template, if a translation does not exist?

I haven’t been able to find any filters or actions that would allow me to do this.

Thanks in advance for any pointers.

1 Like

Having the same issue - did you find any solution to this? :slight_smile:

Cheers

I found a partial workaround - instead of having the same, duplicated template for each language, you store the content as a Section template and then simply embed the same template for all the languages.

Far from ideal as you still need to copy the parent template for each language, but I haven’t been able to find an action/hook that would allow me to do this programatically, which is a shame.

1 Like

Thnks for the insight - been trying out similar approaches every which way to keep the maintainability to a minimum, but no luck so far. Got five languages to manage on a site and yeah, something needs to be improved with this duplication nonsense.

Thnks again for the reply. Cheers.

2 Likes

Depending on the structure of the website, it worked for me in such a way that I only inserted the shortcode from the “main template” in the translated template. This is a workaround, but does not work with all templates, especially not with woocommerce.