• What is the purpose of the _e() function? I see it around and it’s outputting text, I guess, but what is so special about it? I tried looking through the WordPress files but couldn’t find it.

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • It’s part of the language localization function. Anything inside that function will have a corresponding equivalent in all the other language files that are available for WordPress.

    Thread Starter lintmagnet

    (@lintmagnet)

    Does the reader’s selected language have any impact on this? Meaning, if someone in, say, China is reading my site, will things inside the _e() function be translated into Simplified Chinese? Or does this rely on the language selected in the WordPress options?

    No things are not translated on the fly. Your set your language to be used on the blog in wp-config.php and if there is a language file available, you’ll see all the WP goodies in that language.

    Thread Starter lintmagnet

    (@lintmagnet)

    Okay. So, if I were designing my own template, I could, technically, do without those function calls. Is including them part of the WordPress coding ethic?

    Including them would help someone who might wish to port your template over to their local language. If you don’t want to include them, then you don’t have to. WordPress includes them in order to make the product useful to the widest audience possible.

    Thread Starter lintmagnet

    (@lintmagnet)

    Okay. Thanks Nuclear Moose.

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

The topic ‘The _e() function’ is closed to new replies.