Override I18n Language in Spring Boot + JSF

User E is logged in. Localization for key in her language E is performed through:

FacesContext fc = FacesContext.getCurrentInstance();
fc.getApplication().getResourceBundle(fc, "msg").getString(key);

User E wants to send a localized email to offline User F who speaks a different language F.

How can I specify the language F for an event (e.g., sendEmail()) triggered by User E?

messages_E.properties and messages_F.properties are already set up.



Read more here: https://stackoverflow.com/questions/64959186/override-i18n-language-in-spring-boot-jsf

Content Attribution

This content was originally published by mossaab at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: