This guide will walk you through translating layouts created with the Site Builder module of Astra Pro using Polylang.
Site Builder is an advanced module that extends Astra theme capabilities, allowing you to insert sections or code into any page using hooks. You can also create custom templates with this feature.
While Polylang typically allows you to translate pages or posts directly, the process for translating Site Builder layouts requires a few extra steps. You can follow this guide for a smooth translation experience!
What Are the Steps to Translate Site Builder Layouts?
Before you begin, you’ll need to enable translation support for Site Builder layouts in Polylang. Here’s how:
- Go to Languages > Settings.
- Under Custom Post Types and Taxonomies, look for Site Builder (astra-advanced-hook).
- Check the box to enable Polylang for Site Builder and save your changes.
- Next, navigate to Site Builder and Switch to Table View.
In this view, you’ll be able to manage different layouts easily and identify which ones need to be translated.
Now that you’re in the table view, it’s time to start translating:
- Select the language for which you want to create the layout. If there are three languages, follow the process for each language and add the layout manually for all the languages.
Once you have added the layout for all the languages it will look like the below screen:
Note: You can also select the languages for each layout from the editor. Please ensure to select the language for each layout individually.
- Next to connect both the layouts with each other, edit the layout and in the editor screen, select the translated version.
That’s it! You’ve now successfully translated your Site Builder layouts with Polylang. This method will help you maintain a multilingual website with properly translated layouts for each language.
We hope this guide has been helpful. If you have any questions, feel free to reach out in the comments below. We’re here to help!
Additionally, you can explore more about making your website multilingual with Astra and Polylang through this article.