Email Templates Language Issue

Hello,
I've been modifying email templates, like the order_notification.tpl, in order to add the title of a user into the email. I have run into an issue where if a user creates an order they will get a notification in which the title will be in their language, such as French 'M Doe', however if the admin modifies the order and has the admin console set to lets say English then the customer will get 'Mr Doe' instead of the 'M' that they would expect.
It varies slightly per template but currently I'm pulling in the user title via the following code.
{assign var="user_data" value=$order_info.user_id|fn_get_user_info}
{assign var="profile_fields" value=$user_data.user_type|fn_get_profile_fields}

{if $profile_fields.C.40}
{assign var=“profile_title” value=$user_data|fn_get_profile_field_value:$profile_fields.C.40}
{/if}

{__(“dear”)} {$profile_title}

Has anyone got any thoughts about a work around to counter this problem?

Compare $order_info.lang_code and $user_data.lang_code. You can then also determine if you're in admin via $smarty.const.AREA (either A or C).

Also $smarty.const.CART_LANGUAGE may be of assistance.

Thanks tbirnseth,

This nudged me towards my solution

$user_data.user_type|fn_get_profile_fields:'':$user_data.lang_code