The preferred language of the user decides in what language he/she will receive the message.
In your case, the value you set on https://moodle.org/user/language.php?id=6511&course=1 decides in which language you receive password changing related emails.
It is on the user Preferences page.
When you set the preference you need to already know the password, so you need to have already received the mail with the password from moodle... in *your* language.
I need to set the user's language *when* I create the user, not after the user has already received the mail with the password.
Use the user bulk upload interface, eventually for adding only one user. There you can add the language (lang field) of the new user before the email is sent:
- Required fields:
username,firstname,lastname,email
- Optional fields: To provide values other than the default include one or more of these
institution,department,city,country,lang,auth,timezone,idnumber,icq,phone1,phone2,address,url,description,mailformat,maildisplay,htmleditor,autosubscribe
Hi,
I agree with Luciano, except the user should set his language preference before he creates a new account. That way the new account instructions will be in his language.
If you choose to automatically use the language set in the user's browser, that language should be used in the account setup and should be saved to the user's database in the mdl_user/lang field.
If the user selects his language from the language drop list, then that language should be used in the account setup and should be saved to the user's database in the mdl_user/lang field.
It is OK to change that setting in the user's preferences, but it should be written to the database at the time of account setup.
Thanks,
Clarence
When a user creates a new account using self registration, the email with the password is sent in his/her own language.
This reminds me of an issue I raised with an additional plugin: registration with admin confirmation. There the email to the admin user was sent in the language of the registrant. Because you cannot expect that the admin understands every language, I asked the developer to update his code to send this email in the language of the admin user.
So one would expect that when an admin creates a new account using the French interface, the message is sent in French, when using German, the message is sent in German,... But this is not happening, because the language is not (yet) set at that moment.
Adding one line to the user/editadvanced.php file, should generate such an effect:
...
$usernew = $DB->get_record('user', array('id' => $usernew->id));
if ($createpassword) {
++$usernew->lang = $SESSION->lang;
setnew_password_and_mail($usernew);
...