Support

Account

Home Forums Add-ons Flexible Content Field Layouts label translation missing Reply To: Layouts label translation missing

  • Hi @virgodesign

    You should be able to fix it by using this code:

    function my_acf_fix_layout_translate( $field ) {
        
        if( $field['type'] == 'flexible_content' ){
            foreach( $field['layouts'] as $k => $layout ){
                $field['layouts'][$k]['label'] = acf_translate( $field['layouts'][$k]['label'] );
            }
        }
        
        return $field;
    
    }
    
    add_filter('acf/translate_field', 'my_acf_fix_layout_translate');

    I hope this helps 🙂