Welcome to WPSE Peter,
The second argument is a translation domain. This is essentially where the translation for the first argument can be found. By default it checks the WordPress language folder - but if you are creating a custom theme or plug-in,
you cannot rely on the translation for that string to be there (after all the WordPress language folders only contain translations for WordPress, not your plug-in/theme).
The setup is different for plug-ins, but to register a text domain for themes you use load_theme_textdomain
:
add_action('after_setup_theme', 'my_theme_setup');
function my_theme_setup(){
load_theme_textdomain('my-unique-theme-domain', get_template_directory() . '/languages');
}
The first argument is the domain name, which is passed as the second argument in _e()
and __()
. The second is where the translation files can be found.
See Codex for _e()
and __()
.