Class BindingI18nLocalizationService


  • @NonNullByDefault
    public class BindingI18nLocalizationService
    extends Object
    This OSGi service could be used to localize the binding info using the I18N mechanism of the openHAB framework.
    Author:
    Christoph Weitkamp - Initial contribution
    • Constructor Detail

      • BindingI18nLocalizationService

        public BindingI18nLocalizationService​(TranslationProvider i18nProvider)
    • Method Detail

      • createLocalizedBindingInfo

        public BindingInfo createLocalizedBindingInfo​(org.osgi.framework.Bundle bundle,
                                                      BindingInfo bindingInfo,
                                                      @Nullable Locale locale)
        Localizes a binding info.
        Parameters:
        bundle - the bundle the i18n resources are located
        bindingInfo - the binding info that should be localized
        locale - the locale it should be localized to
        Returns:
        a localized binding info on success, a non-localized one on error (e.g. no translation is found).