Page 1 of 1

Reading default language of email recipient

Posted: 12 Mar 2012, 09:19
by pwc
hi,

i'd like to get the default language of the user who is recieving an email, e.g while adding a comment to an issue. I can't find the right function in the php code to read it out... does anyone know this function?

Re: Reading default language of email recipient

Posted: 12 Mar 2012, 09:33
by istvanb
I think this could help. This is coming from the account_pref_update.php

$f_user_id = gpc_get_int( 'user_id' );
$t_prefs = user_pref_get( $f_user_id );


then

echo($t_prefs->language);

will give you the language of the current user.