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 thread is resolved. Here is a description of the problem and solution.

Problem:

Toolset CPT with custom repeatable fields and WPML translation issues.

Solution:

We found a solution that works perfectly: https://toolset.com/forums/topic/toolset-cpt-with-custom-repeatable-fields-and-wpml-translation-issues/

This topic contains 4 replies, has 2 voices.

Last updated by Itamar 1 month, 2 weeks ago.

Assigned support staff: Itamar.

Author Posts
August 26, 2019 at 8:33 pm #4461293

Andreas K.

Hi

I am using Toolset for a CPT on a site along with WPML with two languages and Toolset Views with a search function to show the CPT posts as results.

The CPT has custom fields and some of them are repeatable fields.

And this is where my problem is.

As I have two languages and the CPT posts are going to be written in language 1 first and published and then slowly translated one by one into language 2, I need the views/search to only show the CPT posts for language 1, when that language is selected on the language selector in the menu, and only show the CPT posts for language 2, when that one is selected.

For this I would select “Translatable - only show translated items” for the CPT in the WPML settings, and not “Translatable - use translation if available or fallback to default language”.

But this cannot be done when using repeatable fields?

I am told in the Toolset repeatable customs fields when editing one of the CPT posts, that I need to enable the “Translatable - use translation if available or fallback to default language” setting to access/edit the field.

I seem to have read somewhere on either of your sites something about this also.

It is very unfortunate if this cannot be done as it makes the website work counterintuitive for the users/editors who do not wish to publish/show language 1 posts on language 2 as the fallback setting will it do.

I just switched from Polylang because of conflicts with Toolset Views, and really like WPML, but Polylang had no problem with separating the two language posts on the views though.

What to do? And why is this so?

The funny thing is, that when I do use the setting “Translatable - only show translated items” is does work on the frontend - only the selected language posts are show on the views - but I am just not allowed to edit the CPT fields in the backend, where I get the error (se the attached image).

If I have to use the “Translatable - use translation if available or fallback to default language”, there must be someway to hide the second language on the views, to make the views only show one/the active language??

Both Toolset and WPML is from the same company, as I understand, so I hoped, that they would work perfectly together…

August 28, 2019 at 7:16 am #4471537

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Can you please describe in details how I can replicate this issue?
Please tell me the steps that I should take to also see this issue on my WPML and Toolset test site. It would be helpful if you write to me like this: Do 1. 2. 3. and so on.
Sometimes screen-shots illustrating what you mean may go a long way to clarify what words fail to transmit, so if you like, make use of “upload an image” below the comment area.

Thanks,
Itamar.

August 30, 2019 at 10:06 pm #4489315

Andreas K.

Hi Itamar

I am trying to find a solution with the Toolset team, so I will get back to you, if it is unsuccessful.

Best,
Andreas

August 31, 2019 at 1:03 am #4489471

Andreas K.

Hi

We found a solution that works perfectly: https://toolset.com/forums/topic/toolset-cpt-with-custom-repeatable-fields-and-wpml-translation-issues/

Best regards,
Andreas

September 1, 2019 at 6:10 pm #4492929

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Great, I'm glad that it is solved now!
Good luck with your web projects 🙂
Itamar.