I want to display a localized message with my servlet (in Google App Engine) but i get the message in the wrong language, french instead of english.
I have 2 resource files Messages.properties (english = default) and Messages_fr.properties (french). The browser language is set to english. request.getLocale() is “en” but ResourceBundle.getBundle("Messages",request.getLocale()).getLocale() is “fr”.
I don’t understand what’s happening. Any help is welcome, thanks.
You need to have a physically existing
Messages_en.propertiesfile. It can be left empty so that it will fallback toMessages.properties.