Feature #3807
Send notification emails in language of receiver, instead of language of current website user
| Status: | Accepted | Start: | 2009-06-30 | |
| Priority: | Should have | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | Messaging | |||
| Target version: | 1.9.0 | |||
Description
For a multi-language project we ran into the problem that notifications were sent e.g. in French to all users, just because a website visitor selected to view the site in French (but could still be posting on an English forum).
For this reason I made a patch which looks up the preferred language of users from the fe_users table field 'language' and sends the message in that language (defaults to English if no translation exists for that language).
In order not to disturb current installations I made it optional, enabled through a ts setting:
plugin.mm_forum_pi1.notifyingMail.receiverLanguage = 1
And while working on it I though I could just as well add the option to fix the language of the notifications to 1 specific language for all users, regardless of the current sys_language_uid, e.g.:
plugin.mm_forum_pi1.notifyingMail.receiverLanguage = fr
This may be useful since even on a multi-language site the forum is usually limited to 1 or a few languages.
The patch is for the current SVN version, but is unfortunately untested because in our current project we are working with a slightly older version (only a few months old, but the functions for sending mail have been moved and changed quite a bit since). Right now I cannot afford the experiment of upgrading the forum to the latest dev version because I'm working under time pressure. So if anyone has the chance to test this patch on the latest SVN version, please let us know!
History
2010-01-09 18:30 - Peter Schuster
I think introducing a 'language' field for fe_users is to complex.
A simple check for typoscript setting notifyingMail.receiverLanguage should be fine.
Although the ui language can change for a forum with different website languages the postings stay in one language. So one language for sending mails should be fine.
Maybe we can introduce a hook which allows custom setting of language before sending mails.