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

Last updated by Alejandro 1 year, 9 months ago.

Author Posts
December 13, 2023 at 10:14 am #15052537

danA-11

I am trying to:
We have a custom post type of "Events" created with cmb2, when a post is created it copies fine into german, chinese and japanese. I can see all the information fine on the front end (obviously all in english as not yet translated)
When we use ate to add translation (the cmb2 custom fields are not shown, but this does not matter as they are always in original language) we lose data from the custom fields - particularly "POV Days" which appears at the bottom of the right column.

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

I expected to see:
"POV Days - 0"
Instead, I got:
(All languages are fine before ate translation) the german translation shows - "POV Days - (Blank)" - hidden link

It does not matter what the value of pov days is either as this happens when the value is 1 or 2 or 4 also

Screenshot 2023-12-13 at 10.13.36.png
Screenshot 2023-12-13 at 10.13.27.png
December 13, 2023 at 10:20 am #15052621

danA-11

As you will see, the chinese and japanese versions have all this information from the english originally created post - if we translate them, the POV Days field loses its data.
The client currently is editing the post whilst in the translated language to re add the POV Days field data, i have asked them to leave this post so we can give you an example.

Screenshot 2023-12-13 at 10.19.59.png
December 15, 2023 at 10:09 am #15071081

Alejandro
WPML Supporter since 02/2018

Languages: English (English ) Spanish (Español ) Italian (Italiano )

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

Hello there!

I'll help you get started while a supporter takes your case.

It's very likely those custom fields need to have their translation preferences setup and you can do it using this guide: https://wpml.org/documentation/getting-started-guide/translating-custom-fields/

Just as a short guide:

- You use "copy" when you want to leave the same values among the languages. they will be excluded from the translation editor. good examples are structure fields like radio buttons or images.

- You use "copy once" when you want the language to start with an initial value but then you want to change it manually on the translations. they won't appear in the translation editor.

- You use "translation" when you have text that you want to have translated. text areas, textfields, etc. they do appear in the translation editor.

Try it out and let us know how it goes.

December 15, 2023 at 12:01 pm #15071935

danA-11

Thats great thanks, I found the issue, All of those custom fields except the one i was having issues with were set to copy (which is correct) the issue field was set to Don't translate.