I have jboss server running with fr_CH locale and application client running with de_CH locale. I have two bundles – messages.properties(root) and messages_fr_CH.properties. It is strange, but while being on server side, ResourceBundle.getBundle(“bundleLocation”, new Locale(“de”,”CH”)) returns bundle for fr_CH locale instead of root bundle.
Only thing I could think of is that on server side Locale.getDefault() is “fr_CH”, but if I get it right, due to concept of graceful degradation standard java fallback mechanism should not care about it…
any other thoughts what the problem might be?
Thanks,
Jan
You are correct, this behaviour is because of default locale. Look at javadoc
ResourceBundle.getBundle:So your case is
baseName + "_" + language2 + "_" + country2