phpsyntax

Double underscore in PHP


What does the double underscores in these lines of PHP code mean?

$WPLD_Trans['Yes'] = __('Yes', $WPLD_Domain);
$WPLD_Trans['No'] = __('No', $WPLD_Domain);

Solution

  • It looks like you're using WordPress - wp-includes/l10n.php defines __ as a function that translates a string (similar to gettext and its alias, _, but with an optional parameter for explicitly specifying a domain).