Home Forums ACF PRO acf_form field instructions translations Reply To: acf_form field instructions translations

  • Hi, my solution:
    In the instructions texts I removed the colons of the qtranslate shorttags and add them dynamically with a string replace function in the load field filter followed by the apply_filters function to get the translation.

    [en] English text [de] German text []

    function qtrans_acf_load_field(  $field )
        // exclude acf-field-group page
        if(get_post_type() != 'acf-field-group'){
            $instructions = str_replace('[', '[:', $field['instructions']);  
            $field['instructions']  =  apply_filters('the_title', $instructions);
        return $field;
    add_filter('acf/load_field', 'qtrans_acf_load_field', 10,3);