Skip to content Skip to sidebar

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

Problem:
If you're trying to translate a template and using block theme, but the translated template is not showing and being applied on the translated page check next solution.
Solution:
We have identified this as a known issue and are working on a permanent fix. Meanwhile, here's a workaround that should help:
Follow these steps:
- Remove the translated template.
- Enable Slug Translation in WPML > Settings (Page URL > Translate).
- Navigate to

wp-content/plugins/sitepress-multilingual-cms/classes/full-site-editing/BlockTemplates.php

and comment out the line:

$postData['post_name'] = $post->post_name;

- Send the template to the translation.
- Translate the template, ensuring that the slug is correct, for example, 'page-homepage'.

If this solution doesn't seem relevant to your issue, please open a new support ticket with us.

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 14 replies, has 2 voices.

Last updated by Dražen 1 year, 7 months ago.

Assisted by: Dražen.

Author Posts
January 18, 2024 at 7:57 am
January 18, 2024 at 9:01 am #15198704

Dražen
Supporter

Languages: English (English )

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

Hello,

okay, then please follow the workaround without deleting the template and make a small change to the default language template,save and re-translate the template via translation managment.

For slug of the translated template add your translated page slug. To understand better imagine this is the case:

- you have pages with slug "new-page" (default language) / "new-page-es" (Spanish language)
- your default language page template will have the slug "page-new-page"
- for your translated template you should add slug to be "page-new-page-es", see that after "page" it comes slug, so basically it is "page-pageslug"

Let me know how it goes.

Regards,
Drazen

January 18, 2024 at 9:33 am #15198898

Martynas.V

Thank you Dražen for your patience. Your explanation was very good.