Home Forums General Issues translate choices of radio/select/checkbox fields Reply To: translate choices of radio/select/checkbox fields

  • Hi @renar

    The the_field() function will only show the value of the selected choice, not the label. Could you please check the var_dump() result on the Hebrew page? Please keep in mind that the translated page has a different ID than the original page. If the choices show the Hebrew label, then you can show the label like this:

    $field = get_field_object('field_name');
    $value = get_field('field_name');
    $label = $field['choices'][ $value ];
    <p>Color: <?php echo $label; ?></p>

    Please check the link I gave you before to learn more about it.

    If it doesn’t show the Hebrew label, could you please var_dump() it without the ID of the page like the following?

    echo "<pre>";
    $select_object = get_field_object('select_field_name');
    echo "</pre>";

    If still no joy, I’m afraid you need to translate it by using WordPress localization functions. This page should give you more idea about it:

    Hope this helps 🙂