ResourceBundle.getBundle("validationStrings", Locale.FRENCH)
will look in any JAR on the classpath for a file called validationStrings_fr.properties
directly under the root directory. If it can't find that, it will try validationStrings.properties
.
If you aren't able to change the structure of the language pack JAR, try replacing your entire second snippet with just
this.englishStrings = ResourceBundle.getBundle("strings.language");
this.frenchStrings = ResourceBundle.getBundle("strings.language", Locale.FRENCH);
The englishStrings
line will look for files strings/language_en_CA.properties
(assuming your default locale is en_CA
), and then fall back to strings/language.properties
when it cannot find that. The frenchStrings
line will look for strings/language_fr.properties
.