Package velox.api.layer1.localization
Interface LocalizedBundleProvider
public interface LocalizedBundleProvider
-
Method Summary
Modifier and TypeMethodDescriptionTranslation files has next structure:com.ibm.icu.util.ULocale
-
Method Details
-
getBundle
Translation files has next structure:LocaleElements.properties | ----------------------------- | | Translation_fr.properties Translation_en.properties | ------------------------------------ | | Translation_fr_CA.properties Translation_fr_FR.propertiesIf data in translation file is absent for specific locale than it will be fetched from the `parent` translation file, and it will keep going to the base file until the data is found or anMissingResourceExceptionis thrown.
For more info about structure of locale files please refer toUResourceBundlejavadoc- Parameters:
bundleName- base file name where the translation is stored, without the extension and locale prefixes (i.e. file with translation named like this: "translation_us.properties", than base name is "translation").
If the localization file is not in the root directory of the resources, you must specify the path to it in the bundleName, for example, your file is located in "resources/locale/Translation_us.properties" and taking into account the fact that the "resources" are the root directory then the bundleName should be specified as follows: bundleName = locale.Translation
NOTE: bundleName should be unique between different addons- Returns:
LocalizedBundlewith current Bookmap locale
-
getCurrentULocale
com.ibm.icu.util.ULocale getCurrentULocale()- Returns:
- current Bookmap locale
-