WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
For purposed of expanding, check this tutorial. – Pieter Goosen Jun 5 '14 at 8:40
Additionally see: Codex: Translating Wordpress and Codex: I18n for WordPress Developers. – ialocin Jun 5 '14 at 9:28
up vote 2 down vote accepted

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 __.


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

is same as

echo __('this is a message', 'twentyfourteen');
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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