My wordpress website is using non-english language (e.g chinese), and its backend already turned to chinese

but in wp-content\plugins\divi-builder\includes\no-results.php (i'm using divi builder, in side the file, the code

<!--If no results are found-->
<div class="entry">
        <?php esc_html_e( 'No Results Found', 'et_builder_plugin' ); ?>
        <?php esc_html_e( 'The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.', 'et_builder_plugin' ); ?>
<!--End if no results are found-->

So, how can i translate the string inside esc_html_e?


I do not know direct answer on your question but this maybe helps you. You can use plugin Loco translate or you can do it manually like this.

_e( 'Search', 'name_tag_of_translation' );

Then go in wp-content/languages and there define what is you translation, in your case we talk about plugin, so you go: wp-content/languages/plugins and find your plugin translation or make new file. Creating new file is important, read more on https://developer.wordpress.org/themes/functionality/localization/

My example of translation:

_e( 'Search', 'shopkeeperchild' );

Path where is translation: wp-content/languages/themes/ Files which are responsible for translation: shopkeeperchild-de_DE.mo /* Human readable / shopkeeperchild-de_DE.po / MAchine readable */ For translation I used PoEdit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.