Use different PHP templates for different languages
-
I’ve been tasked to create the translation of an existing site, and I found a terribly non-standard theme, with a slider and CTAs in the homepage that Polylang (and other translation plugins) can’t translate: it’s not done with widgets or something like that, instead it’s all custom settings that do not show up in the Polylang chain translation page.
I wonder if there is some way, using the template hierarchy or some template tag, of executing different theme templates in the same page in different languages. Something equivalent to this:
front-page-spanish.php
front-page-english.phpOr something like a is_language() template tag…
Changing the theme template for the translated version is the only way I think I can bypass the terrible theme options. Is there anything I can do? Thanks for Polylang!
- The topic ‘Use different PHP templates for different languages’ is closed to new replies.