How does printf( __( ) ); work?

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.

edit:

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.

Leave a Comment