Skip to content Skip to sidebar

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

Last updated by Kor 1 year, 11 months ago.

Assisted by: Kor.

Author Posts
September 22, 2023 at 4:22 pm #14448137

kenM-12

Tell us what you are trying to do?
I want to have a different layout for the home page of my French version of the site.

My site theme is built with the FSE functionality and all my layout resides in the Site Editor. There is no layout within a Page (the Page Editor). After I installed the WPML, I added an extra language (French) and I went to the Translation Management section. From there I found the Front Page template that I use for the home page of the site. I duplicated the English Front Page template in to the French one. Then I switched the admin language to French, and went to Appearance > Editor > Templates > Front Page and I edited the layout inside. Initailly it seemed that it worked. I was able to see the changes only for the French version of the home page whereas the English version stayed untouched. However, after a few hours I opened the site again and the French version was again exactly the same as the English version. All my changes were gone.

My questions are: Am I able to change the content of a template from the Appearance > Editor > Templates section (i.e. from the Site Editor) for a particular language. If yes (and I saw that it worked for some time) why did my changes disappeared?

Important note:
I don't want to add the language specific layout from the Page Editor (under Pages). I would like to add it using the Site Editor (Appearance > Editor).

Thank you for your help!

Is there any documentation that you are following?
NA

Is there a similar example that we can see?
NA

What is the link to your site?
hidden link

September 25, 2023 at 4:09 pm #14460537

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Hi there,

Thanks for contacting WPML support.

Since you've duplicated the template into French and would like to edit the French Template, did you click on the "Translate Independently" button as explained here? https://wpml.org/documentation/translating-your-contents/displaying-untranslated-content-on-pages-in-secondary-languages/#how-to-convert-a-translation-into-a-duplicate

If you do not click on that option, it will always copy the contents from the primary language page. Let me know how it goes.

September 25, 2023 at 4:36 pm #14460851

kenM-12

Hi Kor, thank you for your response. I don't see this option on the French page (see attached). Also this function seems to be for pages not for templates, or are the templates also synced when the page is synced?

Screenshot 2023-09-25 at 18.35.25.png
September 25, 2023 at 4:52 pm #14461205

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.

Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.

Your upcoming reply will be treated with confidentiality and will only be visible to you and me.

✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.

September 27, 2023 at 2:59 pm #14475267

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for your response.

I apologize, but I encountered numerous errors when attempting to reproduce the problem on your staging site, as illustrated in the attached screenshot.

As a result, I have set up a sandbox site for us to collaborate on the issue. You can access it here: hidden link

I have diligently followed the steps you provided and created a screen recording demonstrating that I can translate a template and make adjustments to the primary language template(EN) without affecting the secondary language template(NL). You can view the screen recording here: hidden link

Could you please review and confirm whether I have correctly followed the steps to replicate the issue?

Screenshot_38.png
October 4, 2023 at 9:36 am #14511423

kenM-12

Hi Kor, thank you.

Indeed it seems that when you do it there is no issue. I am not sure why my templates got overwritten. In any way, I will probably follow my way of doing it e.g. not through the Translation Management functionality but instead creating the same template for each language separately as it feels safer.