5

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?

1
  • 3
    I would venture to guess that you've either seen array( 'name' => __('page','twentytwelve') ); or $name = __('page','twentytwelve');. Just as an aside. Oct 3, 2013 at 12:08

1 Answer 1

14

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

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.