Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:

The client is using a page builder called Live Canvas and has set a custom post type to 'translatable' in WPML settings. Despite this, switching between translations for the site's footer, built through Live Canvas, does not work.

Solution:

1. Ensure the Footer template is assigned via Theme options.
2. Use WPML String Translation to translate the Theme options. This involves setting the correct translated Post ID in String Translation.
3. Navigate to WPML>>String Translation and click on the Translate texts in admin screens » link at the bottom of the page. Search for the footer option in the Admin Texts Translation screen and add it for translation if listed.
4. If the strings are not in the WordPress localization code, they need to be added. Modify the code in the theme's footer.php file from:

<p><a>About Go Love Life</a></p>

To:

<p><a><?php _e( 'About Go Love Life', 'CustomStrap' ); ?></a></p>

5. After making the code changes, scan for the theme strings from WPML>>Theme and plugins localization>>Strings in the themes to ensure they are listed for translation.

If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. We also highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 3 replies, has 2 voices.

Last updated by Bigul 2 years, 8 months ago.

Assisted by: Bigul.

Author Posts
June 28, 2022 at 11:20 am #11558957

Murchie

Hello Support,

We are using a page builder called Live Canvas in this site.
We are able to successfully add automatic translations to the pages. However, we are encountering an issue with the site's footer.

It is built through the Live Canvas page builder, under a custom post type called Template Partials. Here you can see that we have added German and French translations for this area: hidden link

We have also set this custom post type to "translatable" in the WPML settings: hidden link

However, switching between translations does not work:
hidden link

Can you recommend a workaround or fix for this?

Site URL: hidden link

June 28, 2022 at 4:21 pm #11561587

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

Hope you have assigned the Footer template via Theme options. In some cases, we have to translate the Theme options using WPML String Translation. May setting the correct translated Post ID in String Translation will fix the issue.

Please visit WPML>>String Translation and click on the *Translate texts in admin screens »* link at the bottom of the page. Then search for the footer option in the *Admin Texts Translation* screen and check it is listing or not. If so, please add it for translation and translate it.

Refer to this doc for more details - https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#strings-arent-selected-for-translation

--
Thanks!

Bigul

July 7, 2022 at 3:41 am #11618509

Murchie

Hello Support,

The solution you offered did not fix our issue.
In an attempt to find another solution, we moved all the code from the Live Canvas page builder to the footer.php file of the theme.
I assumed that after doing a "Theme and Plugins Localization" I will be able to find the strings used in the theme and translate them in the "String Translation" table. However, this was not the case as I couldn't find any of the strings in the footer file.

Can you provide me with the steps to get this done?

Edit Themes ‹ Go Love Life — WordPress 2022-07-07 11-39-28.png
Theme and plugins localization ‹ Go Love Life — WordPress 2022-07-07 11-38-22.png
String Translation ‹ Go Love Life — WordPress 2022-07-07 11-40-14.png
July 7, 2022 at 7:36 am #11619839

Bigul
Supporter

Languages: English (English )

Timezone: Europe/Vienna (GMT+01:00)

Hello,

Thank you for the updates. It is happening because those strings are not in the WordPress localization code, so it will not be possible for WPML String Translation to read them. Please refer to the following documentation for more details.

https://developer.wordpress.org/themes/functionality/internationalization/#how-to-internationalize-your-theme

So make the following change in the code and save the file. Then scan for the theme strings from WPML>>Theme and plugins localization>>Strings in the themes and make sure the strings listing for translation or not.

From

<p><a>About Go Love Life</a></p>

To

<p><a><?php _e( 'About Go Love Life', 'CustomStrap' ); ?></a></p>

--
Thanks!

Bigul