Class LocalizationServiceHelper


  • public final class LocalizationServiceHelper
    extends java.lang.Object
    Helper class for retrieving translated strings.
    Author:
    Eugen Neufeld
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getString​(java.lang.Class<?> clazz, java.lang.String key)
      Return the String for the provided key.
      static java.lang.String getString​(org.osgi.framework.Bundle bundle, java.lang.String key)
      Return the String for the provided key.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getString

        public static java.lang.String getString​(org.osgi.framework.Bundle bundle,
                                                 java.lang.String key)
        Return the String for the provided key.
        Parameters:
        bundle - The bundle which provides the translated strings
        key - The key of the string
        Returns:
        The translated key
      • getString

        public static java.lang.String getString​(java.lang.Class<?> clazz,
                                                 java.lang.String key)
        Return the String for the provided key.
        Parameters:
        clazz - The class which needs a translated string
        key - The key of the string
        Returns:
        The translated key