The packaging of ICU *.res files can be of two types ICU4C:
root.res | -------- | | fr.res en.res | -------- | | fr_CA.res fr_FR.resJAVA/JDK:
LocaleElements.res | ------------------- | | LocaleElements_fr.res LocaleElements_en.res | --------------------------- | | LocaleElements_fr_CA.res LocaleElements_fr_FR.resDepending on the organization of your resources, the syntax to getBundleInstance will change. To open ICU style organization use:
UResourceBundle bundle = UResourceBundle.getBundleInstance("com/mycompany/resources", "en_US", myClassLoader);To open Java/JDK style organization use:
UResourceBundle bundle = UResourceBundle.getBundleInstance("com.mycompany.resources.LocaleElements", "en_US", myClassLoader);
|
|