WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today I work through a theme to get a better understanding of WordPress and templating. I discovered this:

    __('Designed by %s', 'Anyword'), 
    '<a href="http://www.example.com">Blub</a>'

I know it shows "Designed by Blub" (Where Blub is linked) But what does the __() mean or why is there a string insert? What for is the Anyword?

Can someone exactly explain this line for me?

share|improve this question

migrated from webmasters.stackexchange.com Jul 2 '12 at 16:19

This question came from our site for pro webmasters.

up vote 7 down vote accepted

It's used for translate text.

The second argument is a kind of namespace (called domain here) to retrieve the translation (for example from a dedicated file or something else).

So Anyword here, should be the guy behind the template, or the company or what ever that can be a domain/namespace.


The doc from wordpress give more explanation on how to internationalizing a plugin:

Add this to the Plugin code to make sure the language file(s) are loaded:

load_plugin_textdomain('your-unique-name', false, basename( dirname( __FILE__ ) ) . '/languages' );

To fetch a string simply use __('String name','your-unique-name'); to return the translation or _e('String name','your-unique-name'); to echo the translation. Translations will then go into your plugin's /languages folder.

For your plugin/theme, the your-unique-name seems to be Anyword.

share|improve this answer
There are some language files in the theme. How does the arguement know to use them for only the 'Anyword'? – Denny Mueller Jul 2 '12 at 15:17
I've updated my answer with a better part from the WP doc. – j0k Jul 2 '12 at 15:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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