19

What is difference between _e() and __() functions for the translation? In what cases e() and __ ()should be used?

37

If you want to echo the translated string, then you will be using _e and when you just want to have the translated string, then you will be using __.

Example:

_e('this is a message', 'twentyfourteen');

is same as

echo __('this is a message', 'twentyfourteen');
-4

If you're a thorough plugin developer you're internationalizing (i18n) all your strings. WordPress includes several functions that allow the programmer to easily make his plugin usable natively worldwide:

__() _e()

  • That doesn't answer the question. – fuxia Sep 13 '17 at 13:29

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.