WordPress languages translation
What do the _() and _e() functions in WordPress do?
In WordPress, strings in the php files are marked for translation to other languages,
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.
We have a tool which goes through all of the php files, extracting strings that are marked by __() and _e().
What do the _() and _e() functions in WordPress do?
In WordPress, strings in the php files are marked for translation to other languages,
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.
We have a tool which goes through all of the php files, extracting strings that are marked by __() and _e().
110朵
0个