WELCOME message not in user's locale
The first page (dashboard) is rendered in the user's locale but the alert sent along with it is rendered in the default locale.
Forum discussion: https://forums.userfrosting.com/t/welcome-message-not-in-users-locale/93/4
As stated on the forum, it's because the alert is generated before the user locale is loaded. The user locale is loaded after the redirect.
See : https://github.com/userfrosting/UserFrosting/blob/master/app/sprinkles/account/src/Controller/AccountController.php#L361
Maybe addMessageTranslated could accept the locale name as an additional argument.
Duplicate of #718. (well, a consequence of at least)
Yes and no... #718 would partly solve this. But if the browser is in French and the account in Spanish, it's still an issue.
Ah. I see. Hmm... Updating the language service to use the new language (if its different) would be a more useful change wouldn't it? That way any messages generated afterward (either from UF code, or user customisations) would be covered.
Actually, forcing a locale when using translate would be more useful... but the way the translator is made, it needs to load all of the translation key... which isn't optimal...
Note this can be experienced when changing the locale in the user setting page.
A more powerful fix would be to register the alert using the translation key/slug + placeholder array, and let the actual translation be done only when displaying the alert.
This is fixed (6 yrs later 😅) in dd98b7f for the 5.1 release.