Html inside __() ??

wordpress

#1

I want to put html inside __(). What is the best way for themeforest themes ??

I am using

printf( __( 'We found <span class="found_hotels text-primary font700">%d</span> hotels with availability in <span class="text-primary font700">%s</span>.' , 'text-demail' ) , $all_rooms_count , $place_name );


#2

So many members but no reply ??


#3

I would do something like this:

printf( esc_html__( 'We found %1$s hotels with availability in %2$s.', 'text-demail' ),

    '<span class="found_hotels text-primary font700">' . esc_html( $all_rooms_count ) . '</span>',
    '<span class="text-primary font700">' . esc_html( $place_name ) . '</span>'

);

#4

Thank you very much