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

jetwodru’s picture

now 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:

}

sgabe’s picture

Priority: Critical » Normal
Status: Active » Closed (fixed)

Seems to be fixed.

manuel.adan’s picture

Not fixed yet. $language global variable refers to the acting user language. The template needs to know the message's lenguage.

manuel.adan’s picture

Version: 7.x-1.0-beta1 » 7.x-1.0-beta3
Status: Closed (fixed) » Active

Not fixed yet. $language global variable refers to the acting user language. The template needs to know the message's lenguage.

akalam’s picture

Status: Active » Fixed

I think in last release you can access to the mail language within $message['language'] in template

akalam’s picture

Status: Fixed » Closed (fixed)