- June 19, 2023
With WPML’s String Translation, you can translate and display theme options like templates, headers, footers, and logos in multiple languages across your WordPress site.
Some WordPress themes come with customizable design options to give your site a unique look and feel. These customizations can include the options to set or change elements for your website like:
Depending on the theme, you may find these options in a dedicated theme options panel on your WordPress dashboard, or integrated into the WordPress Customizer.
With WPML, you can translate theme options like templates, headers, or footers into all of your site’s languages. But sometimes, translating these theme options may not be enough for them to display as translated on the front-end. You may also need to tell your theme which template, header, or footer to show in each language. You can achieve this with String Translation.
While the procedure can vary depending on the theme, you can follow the steps below in most situations. As an example, we will show you how to display a translated custom footer created with OceanWP on the front-end.
- Edit the footer in the default language. Make a note of the ID number that appears in the URL. In the example below, it is 478.
- Use the language switcher in the top admin bar to switch to your secondary language. Then, edit the translated footer and make a note of the ID number that appears in the URL. Ours is 653.
- Go to WPML → String Translation and use the search bar to search for the default language ID number.
Can’t find the string you’re looking for?
If you can’t see the theme options you want to translate in String Translation, you may need to register the strings as translatable.
- Click the plus icon next to the string and add the ID number of your secondary language footer as the translation.
You should now see the translated footer when viewing your site on the front-end.
Default language footer on the front-end
Secondary language footer on the front-end