Package org.openhab.core.addon
Class AddonI18nLocalizationService
java.lang.Object
org.openhab.core.addon.AddonI18nLocalizationService
This OSGi service could be used to localize the add-on info using the I18N mechanism of the openHAB
framework.
- Author:
- Christoph Weitkamp - Initial contribution
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateLocalizedAddonInfo
(org.osgi.framework.Bundle bundle, AddonInfo addonInfo, @Nullable Locale locale) Localizes an add-on info.
-
Constructor Details
-
AddonI18nLocalizationService
-
-
Method Details
-
createLocalizedAddonInfo
public AddonInfo createLocalizedAddonInfo(org.osgi.framework.Bundle bundle, AddonInfo addonInfo, @Nullable Locale locale) Localizes an add-on info.- Parameters:
bundle
- the bundle the i18n resources are locatedaddonInfo
- the add-on info that should be localizedlocale
- the locale it should be localized to- Returns:
- a localized add-on info on success, a non-localized one on error (e.g. no translation is found).
-