Reputation: 45
I have a really impossible task for me. I know how put string content in wordpress ( )
but i don't know how put in this code. I want delete call and show text string.
if (!is_page_template('splash.php')) {
echo '<!-- _________________________ Start Custom HTML _________________________ -->' .
'<div class="header_html">' . "\n" .
'<div class="header_html_outer">' . "\n" .
'<div class="header_html_inner">' . "\n";
if ($cmsms_option[CMSMS_SHORTNAME . '_header_custom_html']) {
echo stripslashes($cmsms_option[CMSMS_SHORTNAME . '_header_html']) . "\n";
}
echo '<div class="cl"></div>' .
'</div>' . "\n" .
'</div>' . "\n" .
'</div>' . "\n" .
'<!-- _________________________ Finish Custom HTML _________________________ -->';
}
i can change it with the nexxt code, but show in front : _e( "text i want translate", "comercialdelmotor");
if (!is_page_template('splash.php')) {
echo '<!-- _________________________ Start Custom HTML _________________________ -->' .
'<div class="header_html">' . "\n" .
'<div class="header_html_outer">' . "\n" .
'<div class="header_html_inner">' . "\n" . '_e( "text i want translate", "comercialdelmotor");';
echo '<div class="cl"></div>' .
'</div>' . "\n" .
'</div>' . "\n" .
'</div>' . "\n" .
'<!-- _________________________ Finish Custom HTML _________________________ -->';
}
Upvotes: 0
Views: 400
Reputation: 9951
I hope I understood your question correctly. You are correct in using _e()
to echo a string. Your syntax use is wrong though. Never ever use "
to enclose a translatable string, the translator does not recognise it, so your string is skipped/ignored.
The correct way is to use '
. So your string should look something like this _e( 'string to be translated', 'domainname' );
Note that domainname
is optional, so using _e( 'string to be translated' );
is also correct.
You can go and read more about translating your theme in this great tutorial. http://code.tutsplus.com/tutorials/translating-your-theme--wp-25014
Upvotes: 1