e.icu-project.org/repos/icu/icuhtml/trunk/design/bnf_rb.txt">BNF definition. More on resource bundle concepts and syntax can be found in the
Users Guide.
The packaging of ICU *.res files can be of two types ICU4C:
root.res | -------- | | fr.res en.res | -------- | | fr_CA.res fr_FR.res
JAVA/JDK:
LocaleElements.res | ------------------- | | LocaleElements_fr.res LocaleElements_en.res | --------------------------- | | LocaleElements_fr_CA.res LocaleElements_fr_FR.res
Depending 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);
Please use pass a class loader for loading non-ICU resources. Java security does not allow loading of resources across jar files. You must provide your class loader to load the resources
@stable ICU 3.0
@author ram