我正在使用wp\\u mail()函数发送电子邮件。我有一个静态字符串“Hello Admin”。我的客户希望将此字符串转换为语言字符串。因此,可以在发送电子邮件时将静态字符串转换为语言字符串。
到目前为止,我已经做了什么,请参考我下面的代码。
$current_user = wp_get_current_user();
$admin_email = get_option(\'admin_email\');
$subject = get_bloginfo(\'name\').\' - Publish Details\';
$message = _("Hello Admin,",\'text-domain\');
$message .= "$current_user->user_login has published details. Details are as following.\\r\\n";
wp_mail($admin_email,$subject,$message,$headers)
输出:John has published details. Details are as following.
我在电子邮件中没有收到语言字符串。任何帮助都将不胜感激。