To correctly treat that, you need to do a similar treatment as the one done in https://bugs.launchpad.net/mahara/+bug/1703608
for the methods get_subject and get message in the class ActivityTypeInstitutionmessage (line 1071 lib/activity.php). The institution is available in $this->institution (passed throught $data at parent::_construct ) That kind of logic could be encapsulated in a helper class or even in institution class... If I manage to get something working, I'll try to send you a proposal. -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1705162 Title: Send institution messages for new users in the correct language Status in Mahara: Confirmed Bug description: 1. When a site admin registers a new user, the account information message, i.e. the one that contains the username and password, is sent in the language of the admin but should be sent in the institution's language (as the user doesn't yet exist and therefore doesn't yet have a language preference). 2. When a site admin or institution admin invites a user to another institution, that message should be sent in the language of the user that is being invited rather than the admin's language or the site language. If the user hasn't set a language specifically, the new institution's language should be used (See bug 1703608). To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1705162/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp