Tranlation Fields
-
Hi,
I currently use Polylang plugin for a multi-language website.
Additionally, I use your plugin with which I have created some custom fields.
The problem is that I have managed to translate the labels of each custom field, but not the value.
I used this code for translate Back Office values, but not work…add_action('init', function () { foreach (acf_get_field_groups() as $group) { $fields = acf_get_fields($group['ID']); if (is_array($fields) && count($fields)) { foreach ($fields as &$field) { pll_register_string('form_field_group'.$group['ID'].'_label_'.$field['name'], $field['label'], 'acf_form_fields'); } } } }); add_filter('acf/prepare_field', function ($field) { if (!is_admin()) { $field['label'] = pll__($field['label']); } return $field; }, 10, 1);For example: I have the Modality field, and this can be online or offline. Modality I can translate it as string in Polylang but not their value.
Is there any solution for this case?
Thank you very much and greetings,
The topic ‘Tranlation Fields’ is closed to new replies.