Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I'm using i18n with 5 languages enabled for user module emails namely account registration, approval, activation and etc.
I'd already translated the contents, however I'd like to show the header and footer of the language being used in mimemail-message.tpl.php , how to detect the language ? Thanks
Comments
Comment #1
jetwodru CreditAttribution: jetwodru commentednow using the codes below, not sure if it's the correct way but it works.
global $language;
switch ($language->language)
{
case "en":
case "zh-hant":
case "zh-hk":
default:
}
Comment #2
sgabe CreditAttribution: sgabe commentedSeems to be fixed.
Comment #3
manuel.adanNot fixed yet. $language global variable refers to the acting user language. The template needs to know the message's lenguage.
Comment #4
manuel.adanNot fixed yet. $language global variable refers to the acting user language. The template needs to know the message's lenguage.
Comment #5
akalam CreditAttribution: akalam at Atenea tech commentedI think in last release you can access to the mail language within $message['language'] in template
Comment #6
akalam CreditAttribution: akalam at Atenea tech commented