Class LanguageManager


  • public final class LanguageManager
    extends java.lang.Object
    The LanguageManager is a static service, which handles messages from different languages, which are registered or loaded there
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void addLanguageFile​(java.lang.String language, Properties properties)
      Add a new language properties, which can resolve with getMessage() in the configured language.
      static void addLanguageFile​(java.lang.String language, java.io.File file)
      Deprecated.
      static void addLanguageFile​(java.lang.String language, java.io.InputStream inputStream)
      Add a new language properties, which can resolve with getMessage() in the configured language.
      static void addLanguageFile​(java.lang.String language, java.io.Reader reader)
      Add a new language properties, which can resolve with getMessage() in the configured language.
      static void addLanguageFile​(java.lang.String language, java.nio.file.Path file)
      Add a new language properties, which can resolve with getMessage() in the configured language.
      static java.lang.String getLanguage()  
      static java.lang.String getMessage​(java.lang.String property)
      Resolve and returns the following message in the language which is currently set as member "language"
      static void setLanguage​(java.lang.String language)  
      • Methods inherited from class java.lang.Object

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

      • getMessage

        public static java.lang.String getMessage​(java.lang.String property)
        Resolve and returns the following message in the language which is currently set as member "language"
        Parameters:
        property - the following message property, which should sort out
        Returns:
        the message which is defined in language cache or a fallback message like "<language LANGUAGE not found>" or "<message property not found in LANGUAGE>"
      • addLanguageFile

        public static void addLanguageFile​(java.lang.String language,
                                           Properties properties)
        Add a new language properties, which can resolve with getMessage() in the configured language.
        Parameters:
        language - the language, which should append
        properties - the properties which will add in the language as parameter
      • addLanguageFile

        @Deprecated
        public static void addLanguageFile​(java.lang.String language,
                                           java.io.File file)
        Deprecated.
        Add a new language properties, which can resolve with getMessage() in the configured language.
        Parameters:
        language - the language, which should append
        file - the properties which will add in the language as parameter
      • addLanguageFile

        public static void addLanguageFile​(java.lang.String language,
                                           java.nio.file.Path file)
        Add a new language properties, which can resolve with getMessage() in the configured language.
        Parameters:
        language - the language, which should append
        file - the properties which will add in the language as parameter
      • addLanguageFile

        public static void addLanguageFile​(java.lang.String language,
                                           java.io.InputStream inputStream)
        Add a new language properties, which can resolve with getMessage() in the configured language.
        Parameters:
        language - the language, which should append
        inputStream - the properties which will add in the language as parameter
      • addLanguageFile

        public static void addLanguageFile​(java.lang.String language,
                                           java.io.Reader reader)
        Add a new language properties, which can resolve with getMessage() in the configured language.
        Parameters:
        language - the language, which should append
        reader - the properties which will be added in the language as parameter
      • getLanguage

        public static java.lang.String getLanguage()
      • setLanguage

        public static void setLanguage​(java.lang.String language)