Sorry I can’t see private replies 🙁 Can you send me email to info(at-domain)kult.si. I really appreciate this. Thanks!
I just got FTP access. I can give you login info or send you theme if you are still willing to help 🙂 Thanks!
Thanks. I will tell them to give me FTP access.
It’s custom theme. I think it is coming from ACF. I can edit this field labels in ACF and see them in Polylang String Translations:
Thank you for your time. I have custom post types named “Projects” and each project has field group “Project data”. I want to translate labels of field group Project data. Website is superform.si. Language switcher is in menu. Here are screenshots:
Ok thank you. They are not cooperating with this developer anymore. I think it’s best they uninstall Polylang and buy WPML?
Oh, sorry. I’m just translating this website. This theme was designed by other company for my client. Where can I look for this?
I tried adding your code to themes functions.php:
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);
Hi! Thank you for this solution. I now see “acf_form_fields” group under String Translations in Polylang plugin. But when I change label name to translated language there is no effect on website front end. Any idea what could be wrong? Thanks!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.