Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 at 8:40
1  

1 Answer 1

up vote 0 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 __.

Example:

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

is same as

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

Your Answer

 
discard

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.