Is there any event that is triggered on language change? Basically I want to save user preffered langauge in database so I was thinking of placing an observer for language change event and dump in database the choosen language for current user and next time when he comes to the site and logs in he will be seeing the site in his last preffered lanuage. so is there any such event and other ways of acheiving this feature are also welcomed.
Thanks in advance.
Note: I am really new to moodle so ignore if I ask something really dumb