Please make sure to update to WPML 4.3.5 and check our list of Known Issues before reporting

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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

Last updated by Konrad Karpieszuk 5 months, 1 week ago.

Assigned support staff: Yvette.

Author Posts
June 17, 2019 at 1:19 pm #4035583

Mr. Ghost

Tell us what you are trying to do?
Translate values only in specific ACF fields. I do not want to translate a whole ACF group, I was thinking about if it's possible to translate the values of an e.g radio button into multiple languages using string translations? When I tried the string translation cannot find any of the values. Is this intended to wrong to translate strings like a value in ACF?

Is there any documentation that you are following?
hidden link

June 18, 2019 at 5:23 am #4040301

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Normally, to translate an ACF field, you need to set the ACF group to be translated. Then, each individual field in the group needs to have the translation options set accordingly to:
- translate
- copy
- do not translate

Please refer to these articles for more details and system requirements.

https://wpml.org/documentation/related-projects/translate-sites-built-with-acf/
hidden link

So, in short, you would need to translate the Field Group and then only set the radio button field to "translate". You should also set the corresponding "system" field to be "copy". The rest of the fields/system fields in the group may be set to "copy" or "do not translate" depending on whether you expect the values to appear in the 2nd language or not.

I hope this answers your question.

June 18, 2019 at 5:48 am #4040533

Mr. Ghost

No this is not what I asked for. Normal text fields I can translate without translating groups which is wht we do today.

I want to translate only specific values. Values such as are in a select, radio button etc. To e.g translate the value from e.g "yes" to local languages. This should be a string translation option to sort such things?

The normal translated values such as text, text area or wysiwyg we do not need to setup such as you suggest above. They are all set to do not translate. Since we only want to translate the value of a custom field. Not the whole backend system.

And tried to set the radio button field to translate to see if I can translate the value. Then nothing happens, where am I suppose to see and insert the translation fo the radio buttons value? Please show me a video. I do not want to have 10000 duplicated groups in ACF were only translating a tiny thing in each. Would cause massive maintence. I just want to translate single simple things such as this radio buttons values. Which I think would be most efficient to do in the string translation.

This since I think you suggest me to translate the whole group but copy all non-translate values. This means I will have 10-1000 90% indentical ACF groups that I need to keep synchronized and create extra bloat for the database with just extra meta fields for 0 reasons. To translate 10% of each group.

So please let me know and show me in a video how it is supposed to work and tell me why this simple and best practice way by using string translation does not support such? This would be the most efficant way to translate small simple things such as this.

June 18, 2019 at 7:44 am #4041033

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Ok - I understand now.

You would like to translate the value "inside" of the custom field. e.g. the selection that is eventually placed within the field.

NORMALLY, the custom field should behave as any other custom field. That is to say that the "value" entered into the custom field will be available to the Tranlsation Editor if the custom field tranlsation option is set to "Translate".

Hmmm

I woudl have to take a look at your site since I don´t have a test ACF/ACFML system available to me at the moment.

Or - alternatively - please configure and setup a simple example in this sandbox site and I can do the necessary investigation there.
hidden link

Thanks

June 18, 2019 at 1:55 pm #4044265

Mr. Ghost

That is to say that the "value" entered into the custom field will be available to the Translation Editor if the custom field translation option is set to "Translate".
What do you mean? Translation editor? We don't use that plugin since it's not suiting our purposes that only works for like a blog post or pure content. We use the core WPML plugin, string translation, and media translation.

And such small values I think is exactly what string translation should be able to do. It is not a text field so the user will no see more than yes and no label as radio buttons. I want to translate the value only so the local market sees the value in the local language.

Please check here and you see the value I want to translate which is used frontend and has ot be localized. It is not a text field it's radio button: hidden link

I suggest you setup ACF PRO/ACFML and WPML to see I don't have enough staging environments to share already have 1 open for other ticket and other devs on another. And you would interfere with each other.

You could easily set this up yourself to try. Let me know when you have a solution and answer.

June 19, 2019 at 10:03 am #4050497

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

You wrote: "I suggest you setup ACF PRO/ACFML and WPML to see I don't have enough staging environments to share "

I have already provided you a sandbox/staging environment here:
hidden link

I do not have access to a license of ACF PRO, and for this reason, I am asking you to login to the sandbox site, upload your copy of the plugins, and setup a simple example so that I can investigate and get additionaly resources on it if needed.

Can you please do this so we can move forward towards a solution?

June 19, 2019 at 6:52 pm #4054099

Mr. Ghost

Ok done. Check the sandbox site which now has ACF PRO and a radio button with 2 values including the label. And it's the value we want to translate in different languages. This since I fetch the value in the template frontend to display "no" or "yes" or any other value that the ie radio button might have.

June 20, 2019 at 9:06 am #4057843

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Thank you for that.

Since you are entering the "choices" values, this is considered "user data" and as such, will not be taken up in the String Translation table.

To make this more clear - please see the way the value is stored in the database table. You can see that the parameters for your field are contained as a serial array in the post-content field.

ACF logic will know how to parse/extract the relevant values. For WPML, the post-content data is considered "user data". String Translation, is only used for PHP templates wrapped in gettext() format as per the WordPress codex. It also will hold any theme/plugin values that are registered with the table wp-options via the PHP call get_options()

So, unless you translate the field (and thereby the Field Group) this value is not accessible for translation.

I wait for your feedback on these observations

June 22, 2019 at 10:14 am #4070837

Mr. Ghost

Ok expected wpml to be able to solve this in a good manner and efficient way but OK. then we have to sue text string and translate it by just writing the text in the text area field.

Translate field groups is not good for maintenance and creates a duplicate to maintain and more metadata for the database to process. I hope you can implement and translate such strings in the future.

June 25, 2019 at 7:24 am #4081771

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Ok.

To close this ticket, I am offering you the link to make this suggestion to our upper management team yourself:
https://wpml.org/suggest-a-new-feature-for-wpml/

Thanks again for your collaboration.

June 25, 2019 at 4:37 pm #4086233

Mr. Ghost

Done

June 25, 2019 at 5:36 pm #4086501

Yvette
Supporter

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

Timezone: Europe/Madrid (GMT+01:00)

Great - closing this ticket. Kind regards.

June 27, 2019 at 7:26 am #4097251

Konrad Karpieszuk
Supporter

Languages: English (English )

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

Hello Mr.Ghost

Your suggestion reached me 🙂 I am ACFML developer, btw.

In fact, we have the ticket now to rewrite this part of ACFML to meet your needs. In future this will not be required to translate the whole field group: you will create a field group and then using string translation you will translate only parts which you need (eg radio button labels)

Unfortunately, I can't estimate when it would be done as this is quite a huge task and requires caution to not break anything. But I am linking now this forum ticket to our bug tracking system so we will not forget about this 🙂

June 29, 2019 at 8:11 am #4111307

Mr. Ghost

Hi @konrad!

That its great news and sounds great! I guess you guys agree that this is how it should work for better and quicker workflow and maintenance.

Good, can you please keep me posted. As for now, we have to build without radio filters to displays value frontend. Do you think it would happen during the July-August or are we talking more towards September or later.

Asking since I have to rebuild the ACF fields and then rebuild once again. I want to use radio, s select or other values to display frontend that is predefined values. This since now it has to be text which is going to be static values I want to control not content/site managers.

So I hope I could see this feature very soon.

July 1, 2019 at 6:18 am #4115725

Konrad Karpieszuk
Supporter

Languages: English (English )

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

Hello

sure, we will update the ticket if something new happen here.

But the feature will be introduced probably much later than in this summer. The thing is this will be quite big transition and we need to handle it correctly not breaking already created sites.

For time being, you can mitigate now what we plan to do.
You can:
- keep field group as not translatable (therefore don't create translated field group)
- in the front end, where you want to display radio label, first register it with this hook https://wpml.org/wpml-hook/wpml_register_single_string/
- and just after that display it with https://wpml.org/wpml-hook/wpml_translate_single_string/

This way you will see your labels as translatable in WPML > String Translation table.