Title: Implement _e () function, how to?
Last modified: August 18, 2016

---

# Implement _e () function, how to?

 *  [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/)
 * [Designing_Themes_for_Public_Release](http://codex.wordpress.org/Designing_Themes_for_Public_Release)
   mentions adding the _e () funtion to “echo titles and headings”. I’ve searched
   around the codex and forums, and haven’t seen something that explains exactly
   how to do this. If I missed it, a gentle nudge in the righ direction would be
   welcome, and if it’s not there and you share with me how to, I’ll gladly add 
   it to the codex.
    Thanks in advance.

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Thread Starter [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-254809)
 * I’ve seemed to answer my question, though I’m not sure if this is a WP specific
   funtion, or a php function.
    The pemise, as I understand it, is when you put 
   the of something in the _e function, and a localization file exists, it searches
   the file for a translation of the word within the function. So if I have this`
   <h2>Links</h2>` and switch it to this `<h2><?php _e('Links'); ?></h2>`, a localization
   file can have the translation of Links, and it will automatically translate the
   word. I’m still not sure where else this should be used, but will continue to
   experiment.
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-254817)
 * That’s exactly how it works. `_e('text')` echos, `__('text')` returns.
 *  [yngwin](https://wordpress.org/support/users/yngwin/)
 * (@yngwin)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-254997)
 * For a bit more info see [http://codex.wordpress.org/Translating_WordPress](http://codex.wordpress.org/Translating_WordPress)
 *  Thread Starter [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255014)
 * Yeah, that was the first page I looked at. It makes a brief mention of the _e()
   function, which Viper confirmed my understanding of. However, there is no where
   else really in that article that explains where good places are to include the
   function. Thus my question. Aside from the headings in the sidebar, where else
   should I use it?
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255069)
 * Best practice is to include it anywhere where you think someone might want the
   text to appear in a different language.
 * For plugins, if you use `_e()`/`__()`, it’s also best to use a custom language
   file.
 *  Thread Starter [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255079)
 * But here’s the dilemma I’m at. Most of the content is obviously dynamic, so are
   there built in features to have, let’s say, page titles translated, or is there
   a way to cojoin the _e() function with the list_pages template tag?
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255100)
 * No need to use it on `list_pages` as it’s either already handled by WordPress
   or it’s content that the user has defined, such as Page titles.
 * Any text that you literally type out should be in a language function. See the`/
   default/` theme for an example.
 *  Thread Starter [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255130)
 * I’m not sure what version of the default theme you are looking at, but there 
   are no instances of _e()…
    Check that, upon futher poking around, it’s classic
   that uses the function, not default. I’ll take further inspection of the theme,
   and report back the instances of use. Thanks for talking me through the process.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255131)
 * The developers decided _not_ to include anymore the “gettext version” of the 
   default theme in the distro… howevere you can study it here:
    [http://svn.automattic.com/wordpress-i18n/theme/](http://svn.automattic.com/wordpress-i18n/theme/)(
   click on trunk)
 *  Thread Starter [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255135)
 * Outstanding Moshu. Between studying the classic theme, and the link you provided,
   I can not only fix what I want for my first”public release”, I can also update
   my “blank theme”.
 * Thank you both.
 *  Thread Starter [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255138)
 * But here lies a question. If it was decided not to be included in the distro,
   then why is there language in the codex suggesting that any theme distributed
   contain such code?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255139)
 * Translators can get the default from the link above. Then using the “gettext 
   technology” a translator can extract the properly marked strings into a POT file
   and work on translation (.PO file) and, finally, generate a .MO file to be used
   in the localized WP.
    For individual themes – not having a central repository–
   I guess it’s recommended to have the code ‘ab ovo’… But this could be only my
   theory 🙂
 *  Thread Starter [Michael Bishop](https://wordpress.org/support/users/miklb/)
 * (@miklb)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255141)
 * Right O’. Needless to say, I want to have it in the “blank theme” and any thing
   I were to release. Cheers again for the link and more clarification.
 *  [yngwin](https://wordpress.org/support/users/yngwin/)
 * (@yngwin)
 * [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255266)
 * Yes, indeed default is lacking that respect (as in a number of others…) — quite
   a serious oversight if you ask me that the default theme is not internationalized.

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Implement _e () function, how to?’ is closed to new replies.

## Tags

 * [funtion](https://wordpress.org/support/topic-tag/funtion/)
 * [templates](https://wordpress.org/support/topic-tag/templates/)

 * 14 replies
 * 4 participants
 * Last reply from: [yngwin](https://wordpress.org/support/users/yngwin/)
 * Last activity: [20 years, 9 months ago](https://wordpress.org/support/topic/implement-_e-function-how-to/#post-255266)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
