WP Soft Rejection!! Need Feedback

Hi everyone,
Can anyone please suggest how to localize this?

Thanks & Regards

Example code:
<div class="acf-input"><p><?php esc_html_e( 'YOUR-TEXT-CONTENT', 'Text domain'); ?></p></div>

more info:

It’s not working.
Can you please show the exact code how to do it from the screenshot? I’m new on WordPress. It’ll be much appreciated if you could do this for me.

paste your code here and your text domain.

BTW, B tag is deprecated, you should use STRONG

$default_text .= '<div class="ocdi acf-input"><div class="acf-notice"><p>Importing the demo will replace your <b>Design & Colors</b> settings.</p><p>It is recommend that you configure a <b>Menu</b>, the <b>Footer Section</b> and <b>General Settings</b> regardless of the import of the demo.</p></div></div>';

My text domain is ‘transio’

You can try this:

$default_text .= '<div class="ocdi acf-input"><div class="acf-notice"><p>'.esc_html__( "Importing the demo will replace your", "transio").' <strong>'.esc_html__( "Design & Colors", "transio").'</strong></p><p>'.esc_html__( "It is recommend that you configure a", "transio").' <strong>'.esc_html__( "Menu", "transio").'</strong>,'.esc_html__( "the", "transio").' <strong>'.esc_html__( "Footer Section", "transio").'</strong>,'.esc_html__( "and", "transio").' <strong>'.esc_html__( "General Settings", "transio").'</strong>,'.esc_html__( "regardless of the import of the demo.", "transio").'</p></div></div>';

@mgscoder
Again, syntax error showing. Code is not working! Here are the full function for your reference.

function ocdi_plugin_intro_text( $default_text ) {

	$default_text .= '<div class="ocdi acf-input"><div class="acf-notice"><p>Importing the demo will replace your <b>Design & Colors</b> settings.</p><p>It is recommend that you configure a <b>Menu</b>, the <b>Footer Section</b> and <b>General Settings</b> regardless of the import of the demo.</p></div></div>';

	return $default_text;
}
add_filter( 'pt-ocdi/plugin_intro_text', 'ocdi_plugin_intro_text' );

Please help me to do that!

I have edited my above code, try with that one.

I have tried this… Is it the right way?

$default_text .= __( '<div class="ocdi acf-input"><div class="acf-notice"><p>Importing the demo will replace your <strong>Design & Colors</strong> settings.</p><p>It is recommend that you configure a <strong>Menu</strong>, the <strong>Footer Section</strong> and <strong>General Settings</strong> regardless of the import of the demo.</p></div></div>' , 'transio' );

Use @mgscoder code, but it should not be esc_html_e, but esc_html__

1 Like

My mistake you are storing the text in a variable not doing echo/print. So, @LSVRthemes is right. I have edited again to correct the code for you and others who will check in future to get an idea.

Thanks for your help!
@mgscoder @LSVRthemes

1 Like