Best practice forum (Archived)

Email Language

 
Alex Büchner
Email Language
by Alex Büchner - Wednesday, 5 October 2011, 6:18 AM
 

A customer of ours has setup where the managers / admins use English as their language, but the learners are French. When notifications are sent automatically, they will be in the language of the sender, not the receiver, which is perceived as a bug.

a) can this behaviour be changed at the moment?

b) if not, can this be considered as a freature request?

Thanks

Alex

Simon Coggins
Re: Email Language
by Simon Coggins - Sunday, 9 October 2011, 6:57 PM
Group Totara

Hi Alex,

I don't think there is any way to do that at the moment. It would need to be fixed everywhere in the code where emails are sent so could be quite a bit of work.

Are there a few specific places where they need it to work, or is it site-wide?

Simon

Alex Büchner
Re: Email Language
by Alex Büchner - Monday, 10 October 2011, 1:54 AM
 
It would be site-wide. I can see their reasoning. You have a French learner who receives all notifications in English.
Simon Coggins
Re: Email Language
by Simon Coggins - Thursday, 13 October 2011, 2:33 PM
Group Totara

I can definitely see their reasoning.

I've looked into it a bit more and there is a possible fix described here:

http://tracker.moodle.org/browse/MDL-14483

I will look into applying it to Totara.

Simon

Alex Büchner
Re: Email Language
by Alex Büchner - Thursday, 13 October 2011, 10:19 PM
 

Nice find. 

Thank you

Alex

Totara
Re: Email Language
by Alastair Munro - Wednesday, 26 October 2011, 12:25 PM
Group Totara

Hi Alex,

We have developed a fix for this issue and it is included in the Totara 1.1.2 release.

Cheers,
Alastair

Rainer Gerecke
Re: Email Language
by Rainer Gerecke - Thursday, 14 February 2013, 2:33 AM
Group Partners

Hi,

may we ask what the status of this issue is with current TotaraLMS 2.2.14?

It looks like there are still emails not being sent in the user's preferred language. The following functions we see as generating emails using the function get_string($identifier, $module, $a, $user->lang) without specifying the fourth argument ($user->lang):

function email_welcome_message
function send_confirmation_email($user)
function send_password_change_confirmation_email($user)
send_password_change_info($user)
function send_message($eventdata)
function certificate_email_teachers($course, $certificate, $certrecord, $cm)
function certificate_email_others($course, $certificate, $certrecord, $cm)
function certificate_email_student($course, $certificate, $certrecord, $context)
function facetoface_cron()
function facetoface_send_request_notice($facetoface, $session, $userid)
function totara_cohort_notify_users($cohortid, $userids, $action, $delaymessages=false)
function send_scheduled_report($sched)

Is there still work in progress regarding this or will it remain inevitable to check and fix related problems for every upcoming implementation?

Thank you

Rainer

Ciaran Irvine (Core Developer)
Re: Email Language
by Ciaran Irvine (Core Developer) - Thursday, 14 February 2013, 1:58 PM
 

Hi Rainer,

Improving language support is always a work-in-progress. There are so many places that need to be fixed. Thank you for your list of functions that need work, it's always helpful when partners direct us to specific issues.

A few comments:

Facetoface emails cannot be internationalised properly in the current version because of the way the facetoface sessions are created and stored.  https://support.totaralms.com/wr.php?request_id=523

function send_message is called from all over the system with the message subject and body already contained in the $eventdata object. It will be quite a lot of work to fix all of them!

But apart from facetoface your list is a very useful starting point for for improving language support, so you may expect various fixes in the forthcoming 2.2 releases.

Ciaran Irvine (Core Developer)
Re: Email Language
by Ciaran Irvine (Core Developer) - Wednesday, 13 March 2013, 7:02 PM
 
A patch to hugely improve internationalisation of emails in the recipient's language is included in today's (14th March 2013) release of Totara 2.2.16
Niek Hogervorst
Re: Email Language
by Niek Hogervorst - Thursday, 14 March 2013, 7:27 AM
 

Hi Ciaran,

Could you clarify what we can expect? I've just upgraded a test site to 2.2.16, but I can't seem to find this in the obvious places. I must have missed a setting somewhere.

Thanks in advance,

Niek

David Curry (Core Developer)
Re: Email Language
by David Curry (Core Developer) - Thursday, 14 March 2013, 2:39 PM
Group Totara

Hey Niek,

There isn't a setting for this. it is handled automatically, sending the email in the language the recipient has set in totara (where possible). Some places like program management where the user defines the content we can't translate, but we are fairly sure we have caught all the possible emails.

I'll just run through it, if your site is set to italian, and you have a user with language set to japanese with a manager whose language is set to german. It used to be if they manually self enrolled in a course they got a welcome message in italian and if their manager would have gotten a notification it too would have been in italian. Now the learner would recieve their welcome message in japanese, and their manager the notification in german. Give it a go and let us know if you find any places where it isn't working that you think it should be (i.e. not user defined messages).

Cheers
David