I’m using twentytwelve theme with 1.0 version. I saw many codes like following,
'name' = __('page','twentytwelve');
If I give,
'name' = 'page';
It’s also working fine. Then why using __()?
What is use of that?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Internationalization and localization (commonly abbreviated as i18n
and l10n respectively) are terms used to describe the effort to make
WordPress (and other such projects) available in languages other than
English, for people from different locales, who use different dialects
and local preferences.
__() is used when the message is passed as an argument to another function. _e() is used to write the message directly to the page. More detail on this @ http://codex.wordpress.org/Translating_WordPress
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0