When changing the locale, record the change in the user's preferences