Commit 1d9b81af authored by Dries's avatar Dries

- Patch #830304 by solotandem: drupal_mail() doc example using D6 syntax for t().

parent 2a3bf449
......@@ -53,12 +53,14 @@
* }
*
* function example_mail($key, &$message, $params) {
* $language = $message['language'];
* $variables = user_mail_tokens($params['account'], $language);
* $data['user'] = $params['account'];
* $options['language'] = $message['language'];
* user_mail_tokens($variables, $data, $options);
* switch($key) {
* case 'notice':
* $message['subject'] = t('Notification from !site', $variables, $language->language);
* $message['body'][] = t("Dear !username\n\nThere is new content available on the site.", $variables, $language->language);
* $langcode = $message['language']->language;
* $message['subject'] = t('Notification from !site', $variables, array('langcode' => $langcode));
* $message['body'][] = t("Dear !username\n\nThere is new content available on the site.", $variables, array('langcode' => $langcode));
* break;
* }
* }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment