function pm_email_notify_text in Privatemsg 7.2
Returns body or subject strings.
Parameters
$key: Defines which string to return, either subject or body.
$language: Optionally define the language to translate into. Defaults to the active language.
Return value
The translated text.
2 calls to pm_email_notify_text()
- pm_email_notify_mail in pm_email_notify/
pm_email_notify.module - Implements hook_mail().
- PrivatemsgEMailNotifyTestCase::verifyMail in pm_email_notify/
pm_email_notify.test - Verify a notification mail.
File
- pm_email_notify/
pm_email_notify.module, line 284 - Notifies users about new Private Messages via Email.
Code
function pm_email_notify_text($key, $language = NULL) {
$text = _pm_email_notify_source_text($key);
$function = 'i18n_string_translate';
if (function_exists($function)) {
$translated = $function('pm_email_notify:mail:mail:' . $key, $text, array(
'langcode' => isset($language) ? $language->language : NULL,
));
return $translated;
}
return $text;
}