In the simplest of terms, they "print" what you tell them to do. They are abbreviations for the PHP term "echo" which displays text. In WordPress, they are used to identify strings in the php files marked for translation to other languages, and localization using two "tags" which are actually functions. They are:

  • __()
  • _e()
  • These accept a string as an argument. For example:

    __("Translate Me")
    _e("Translate Me")

    The only functional difference between the two methods is that _e() echoes the string and __() simply returns the string. __() is used when you want to supply a string to a function. _e() is used when you want to output the string as part of your XHTML.

    There is a tool which goes through all of the php files, extracting strings that are marked by __() and _e().

    Posted in: WordPress

    Related FAQ's

    Marius Ion ANGEL HOT SOFT LLC (800) 316-7677