public class LocalisationBundleLoader extends java.lang.Object implements BundleLoader
Constructor and Description |
---|
LocalisationBundleLoader(java.lang.Class refClass,
java.lang.String fileQualifier)
Creates a bundle loader loading a file <classname>_<fileQualifier>.properties from the class folder of the given class
|
LocalisationBundleLoader(java.lang.String resourceName,
java.lang.ClassLoader loader)
Creates a bundle loader using a properties file under the given resource name and the given loader to laod it
|
Modifier and Type | Method and Description |
---|---|
java.util.ResourceBundle |
getBundle(java.util.Locale locale)
Returns a resource bundle for the given locale
|
public LocalisationBundleLoader(java.lang.String resourceName, java.lang.ClassLoader loader)
resourceName
- The base resource name of property files containing labels. Specify the full qualified resource path but omit language code and ".properties" suffix. For example "de/innovationgate/wga/mylabelfile"loader
- A class loader used to retrieve the property file resourcespublic LocalisationBundleLoader(java.lang.Class refClass, java.lang.String fileQualifier)
refClass
- Reference class. Its folder and classname is used for finding the labels filefileQualifier
- Part of the properties file name after the classname and before language codes. Specify null for the properties file only having the class namepublic java.util.ResourceBundle getBundle(java.util.Locale locale)
BundleLoader
getBundle
in interface BundleLoader
locale
- The locale