Class Localization


  • public final class Localization
    extends Object
    Localization-Class for GUITools
    • Method Detail

      • init

        public static void init​(String baseName,
                                String language,
                                String country)
        Initialize localized Strings
        Parameters:
        baseName - BaseName for localization
        language - Language
        country - Country
      • init

        public static void init​(String baseName,
                                String language,
                                String country,
                                boolean notFoundPrefix)
        Initialize localized Strings
        Parameters:
        baseName - BaseName for localization
        language - Language
        country - Country
        notFoundPrefix - Flag if the NOSTRINGFOUND_ prefix should be added, if there is no translation found for a key
      • getString

        public static String getString​(String key)
        Returns the localized String for a key. If the key is not found and notFoundPrefix is true then the key prefixed by "NOSTRINGFOUND_" is returned
        Parameters:
        key - Key
        Returns:
        Localized String
      • getString

        public static String getString​(String key,
                                       String notFoundPrefix)
        Returns the localized String for a key
        Parameters:
        key - Key
        notFoundPrefix - Prefix which is added in front of the key, when the key was not found. null will add no prefix.
        Returns:
        Localized String