Skip Navigation

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.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Bruno Kos 1 year, 10 months ago.

Assisted by: Bruno Kos.

Author Posts
July 18, 2023 at 3:03 pm #14060345

vinkoB

Hello,

I am trying to:
I use Woodmart's layout to get a custom layout on my product pages.
The translation works, only the translated layout is not shown to me in the frontend.

Link to a page where the issue can be seen: hidden link

I expected to see:
That the product layout looks exactly the same in both languages.

Instead, I got:
On the German page I see my Woodmart layout, on the translated language I see the default layout of Woodmart.

Cause:
With Woodmart's layout I can determine via "condition" the display of the layouts.
I have set this to "product category".

The condition is applied in both languages, but if I check the conditions in English I see that the translated category is not used, but the German one (original language). If I change the category manually to English, the translated layout is displayed in the frontend. BUT if I make a new change to the layout in the original language and update the translation, the category is wrong again.

Explaining video how the bug occurs (video is with comments for better understanding):
hidden link

I have already asked Woodmart support and received the following:

The field in question, which needs to be translated, contains an array with 3 keys (see screenshot "woodmart-3-array") while WPML is displaying only an array with 2 keys (see screenshot "wpml-2-array").

I hope you can help me in this matter.

wpml-2-array.png
woodmart-3-array.png
July 19, 2023 at 7:33 am #14062857

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Hi,

Thank you for contacting WPML support!

In general we don't translate such fields, these should be left as "copy" or "don't translate" while WPML filters should be used in the theme in order to use translated templates.

However can you do the following:
hidden link

On this sandbox can you install Woodmart, create a simple template and translate in the same way you are translating it in your website, I will check then and if needed, I will escalate to our compatibility team for further checks.

Regards,
Bruno Kos

July 19, 2023 at 9:21 am #14064011

vinkoB

Hi Bruno,

in the sandbox everything is now set up the same way as on my website. The error can be reproduced here as well.

July 19, 2023 at 12:15 pm #14065967

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Ok, can you show me on which page is this template set? On which sandbox URL this doesn't work properly?

July 19, 2023 at 12:30 pm #14066047

vinkoB

This is the URL to the product page where you can see the correct layout: hidden link

This is the translated product page with the wrong layout: hidden link

The layout is set to display only on product single pages within the product category "Training device".

July 20, 2023 at 8:30 am #14070095

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

Timezone: Europe/Zagreb (GMT+02:00)

Can you check if it works now?
hidden link

If so, you can apply these changes to your website and see if it works.

The steps I took:
hidden link

July 25, 2023 at 6:00 am #14093073

vinkoB

Hello Bruno,

we have tested everything thoroughly and it all seems to work!
That's great.

Thanks a lot for your help!