Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I noticed on our FR/EN site that the FR user registration emails were not in the user's language.
a little digging and could see that user module actually does create these tokens using a $language object.. which is good, but this language object comes from the user object and their preferred language.
A little more digging and i see that since we are using logintoboggan and it overrides the user register submit function it would be trivial to have this module set the user's preferred language to the lang the site was in when the user submitted his registration.
this patch does that.
Comment | File | Size | Author |
---|---|---|---|
logintoboggan-set_users_lang.patch | 639 bytes | liquidcms |
Comments
Comment #1
Pasquallethis is a bug, as there is no way to change the language of registration emails, they are always sent in English.
but it is a bug in Drupal 6 core also #163165: Multilanguage support for user emails..
Comment #2
hunmonk CreditAttribution: hunmonk commentedi have examined LT's user register function and compared it to core's matching function -- there are no differences that would cause a problem with this functionality. cross examining #163165: Multilanguage support for user emails, it appears there was a patch that made the necessary change to core's user.module register function: http://drupal.org/files/issues/drupal.user-register-language.patch
however, the final committed patch did not contain the user.module changes: http://drupal.org/files/issues/d7.163165.user-register-language-v03.patch
i suggest somebody try to straighten out what's going on in that issue first. :) because LT has to overtake core's user register function, i model LT's function after core's to achieve the same workflow with LT's enhancements.
so, make core's register function do what you need, then reopen this issue and i'll port over the changes. same goes for the 6.x version.
Comment #3
Pasquallein D7 the language is set correctly in locale.module on line 282
The user object contains the correct default language before the registration mail is sent..
ok, so let's start with D6 core
Comment #4
hunmonk CreditAttribution: hunmonk commentedso then this needs to be postponed, but for 6.x only it sounds like...
Comment #5
kenorb CreditAttribution: kenorb commentedClosed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.