Usage

Parameters

Return Values

(string)

Translated text

Examples

Make a string inside your plugin or theme translatable:

$translated = __( 'Hello World!', 'mytextdomain' );

'mytextdomain' needs to be a unique text domain used throughout your plugin/theme. This should always be directly passed as a string literal as shown above, not a string assigned to a variable or constant. E.g., this is incorrect: