Skip Navigation

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
9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 - -
- - - - - - -

Supporter timezone: Asia/Yerevan (GMT+04:00)

This topic contains 0 reply, has 0 voices.

Last updated by Christopher Amirian 3 months ago.

Assisted by: Christopher Amirian.

Author Posts
March 4, 2025 at 10:49 am

nascoL

Background of the issue:
I am trying to translate ACF radio buttons on my website. The issue can be seen on this page: hidden link

Symptoms:
I expected to see English values, but instead, I got Dutch values.

Questions:
How can I translate ACF radio buttons to show English values instead of Dutch?

March 4, 2025 at 11:27 am
March 4, 2025 at 11:28 am #16773434

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Welcome to WPML support. Please give us the login information to the website copy/staging so we can continue investigating without the fear of ruining the live website.

Please make the next reply private.

Thank you.

March 4, 2025 at 12:04 pm
March 5, 2025 at 3:59 pm #16779767

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the information and sorry for the late reply. There is no need for the FTP connection.

Unfortunately the first step which is the server user/pass does not work for me. Would you please double check the information sent?

Thanks.

March 17, 2025 at 9:09 am
March 17, 2025 at 1:55 pm #16825482

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,

Thank you for the login information.Please change your loop code to retrieve the string this way:

<?php
$field = get_field_object('type_referentie');
$value = get_field('type_referentie');
$key = strtolower($value);
$type_referentielabel = isset($field['choices'][$key]) ? $field['choices'][$key] : '';
?>			

Then use the type_referentielabel variable to show the label.

Do the same for the other fields and it should work ok.

Here is the code result for the type field:

hidden link

Thanks.

March 18, 2025 at 1:18 pm #16830546

nascoL

Hi Christopher,

Thanks for getting back at me. I see some are translated but not all (see attached screenshot). I have tried the same for the other string also (Kind), but it still shows the Dutch language. if I look at String Translation i see all strings translated. can you pinpoint the issue here?

Thanks!

Screenshot 2025-03-18 at 14.16.15.png
March 21, 2025 at 1:56 pm #16844939

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi,
Sorry for my late reply, I fixed the code to include other scenarios.

Also I found out that the there was instances of the choices that were detected in wrong language in string translation.

I changed the language source:
https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings

Also some instances were not translated and I translated them.

The only problem that is still there is some sort of conflict for the Vrijstaand huis option.

In the code it shows the key as:

vrijstaandewoning instead of vrijstaandhuis

That is why it does not show. If you change the option to something else in the radio of a project you will see that it works ok.

I suggest that for that you remove the option and remove the translations of those options and try to add it at the end of the choices of the radio with slightly different wording and do the translation and see if it works ok.

By the way I will be on vacation and not able to answer back, so for additional questions I'd appreciate it if you could open up a new ticket here so my colleagues can help:

https://wpml.org/forums/forum/english-support/

Thanks.

The topic ‘[Closed] I want to translate ACF radio buttons’ is closed to new replies.