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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Supporter timezone: Europe/Zagreb (GMT+02:00)

This topic contains 7 replies, has 2 voices.

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

Assisted by: Dražen.

Author Posts
October 9, 2023 at 11:11 am #14538673

vishalG

https://wpml.org/forums/topic/wpml-content-copy-is-not-working-with-acf-block-3/

This is the previous topic we received support from. To sum all the threads before this: we were using "copy content" to copy our contents to translated pages. It is working with other languages but not with Spanish and Portuguese. An alternative was offered by the previous supporter, duplicating the pages. But duplicating the pages are not copying the pages unless the Fields Groups are set to "not translatable". It works when we set it to not translatable but our header and footers are custom fields and used with translation. When field groups are set to not translatable, our footers and headers of the translated pages are not rendered. So to set our fields groups to not translatable, we need to change our footer and header system which is not what we are looking for.

Is there an alternative way to create pages for other languages and copying the content from English?

October 10, 2023 at 7:56 am #14546845

Dražen
Supporter

Languages: English (English )

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

Hello,

thanks for contacting us.

Duplicate mode should work fine, as long as the translation group are translated correctly and the translation setting for each field is set correctly. Fields need to be set to COPY ONCE or Translate.

If you experience different behavior, please try to create a dummy simple example on next test site and I will check it out further.

- hidden link

Please do not add any additional custom code or themes or migrate your website.

Thanks,
Drazen

October 20, 2023 at 10:41 am #14622683

vishalG

Hello Drazen,

I apologize for the delayed response. The link has expired. Is it possible to renew the link?

Thank you very much

October 20, 2023 at 11:45 am #14622999

Dražen
Supporter

Languages: English (English )

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

Hello,

sure, here it is a new sandbox link:

- hidden link

Please do not add any additional custom code or themes or migrate your website.

Thanks,
Drazen

October 23, 2023 at 7:30 am #14633481

vishalG

Hello,

I configured WPML as our website but I actually cant install the acf plugin to recreate the problem bc blocks are premium and we mainly use blocks in our site.

I checked some of the blocks I have problems with. Their fields are set to Translate so I dont understand whats the problem.

October 23, 2023 at 7:52 am #14633701

Dražen
Supporter

Languages: English (English )

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

Hello,

not all fields should be set to Translatable, depending on type some of them should be set to COPY.

- https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/recommended-custom-fields-translation-preferences-for-acf-and-wpml/

You said, it works fine when field groups are Not Translatable, and that is something we do recommend as otherwise, issues can occur.

- https://wpml.org/errata/advanced-custom-fields-field-group-should-be-set-as-not-translatable/

Can you please explain why this causes issues with your header and footer system and how you are building them and translating them? It should work fine also with field groups not translatable. Maybe I can help with that and that will solve your troubles.

Let me know.

Thanks,
Drazen

October 23, 2023 at 10:03 am #14636185

vishalG

Hello,

Fields like image etc are set to Copy Once as we dont want them to be synced. Text areas are set to Translate. Would only one field set to "Not Translate" effect the situation or does the "Translate" or "Copy" ones should be duplicated no matter how the other fields are set?

We created block structures for the headers and the footers and implemented them statically for English language. For every other language, we translate it from the English one and create a new header for that language. This way, whenever the page is in another language, it uses the translation of the English one. You can see below the Portuguese menu is the translation of the English one. When we set the fields to "Not Translatable" this translations gets deactivated so the pages doesn't render a header.

Screenshot 2023-10-23 at 12.57.55 PM.png
October 24, 2023 at 6:09 am #14642337

Dražen
Supporter

Languages: English (English )

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

Hello,

as I explained before, copy will only duplicated, while copy-once and translate will stay empty, that is if you translated field group correctly.

This way, whenever the page is in another language, it uses the translation of the English one. You can see below the Portuguese menu is the translation of the English one. When we set the fields to "Not Translatable" this translations gets deactivated so the pages doesn't render a header.

That should not be correct and act like this since you are setting field groups to Not Translatable not fields themself. So fields still stay in both languages and you can still translate them as before.

Do you have a staging site where we could try this out and check? You show what is not working when field groups set to not translatable and I think I can fix it, and correct your configuration. Of course, if you wish to proceed in this direction.

Let me know.

Thanks,
Drazen

The topic ‘[Closed] WPML Content Duplicating is not working when field groups set to Translatable’ is closed to new replies.