Package wprover

Class Language


  • public class Language
    extends java.lang.Object
    Language class for managing language-specific strings and font settings. This class provides methods to retrieve localized strings, write language files, and manage font settings.
    • Constructor Summary

      Constructors 
      Constructor Description
      Language()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void combine​(Language lan)
      Combines the current language with another language.
      java.lang.String getEnglish​(java.lang.String s)
      Gets the English string for the specified translated string.
      java.awt.Font getFont()
      Gets the font associated with the current language.
      wprover.Language.lnode getlnode​(int n)
      Gets the language node with the specified index.
      static java.lang.String getLs​(java.lang.String s)
      Gets the localized string for the specified string.
      java.lang.String getName()
      Gets the name of the current language.
      java.lang.String getString​(java.lang.String s)
      Gets the translated string for the specified English string.
      java.lang.String getString1​(java.lang.String s)
      Gets the tooltip for the specified English string.
      boolean isEnglish()
      Checks if the current language is English.
      static void setLanguage​(Language lan)
      Sets the current language instance.
      • Methods inherited from class java.lang.Object

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

      • Language

        public Language()
    • Method Detail

      • setLanguage

        public static void setLanguage​(Language lan)
        Sets the current language instance.
        Parameters:
        lan - the Language instance to set
      • isEnglish

        public boolean isEnglish()
        Checks if the current language is English.
        Returns:
        true if the current language is English, false otherwise
      • getFont

        public java.awt.Font getFont()
        Gets the font associated with the current language.
        Returns:
        the Font associated with the current language
      • getName

        public java.lang.String getName()
        Gets the name of the current language.
        Returns:
        the name of the current language
      • getString

        public java.lang.String getString​(java.lang.String s)
        Gets the translated string for the specified English string.
        Parameters:
        s - the English string to translate
        Returns:
        the translated string, or the original string if not found
      • getString1

        public java.lang.String getString1​(java.lang.String s)
        Gets the tooltip for the specified English string.
        Parameters:
        s - the English string to get the tooltip for
        Returns:
        the tooltip, or an empty string if not found
      • getEnglish

        public java.lang.String getEnglish​(java.lang.String s)
        Gets the English string for the specified translated string.
        Parameters:
        s - the translated string to get the English string for
        Returns:
        the English string, or the original string if not found
      • getLs

        public static java.lang.String getLs​(java.lang.String s)
        Gets the localized string for the specified string.
        Parameters:
        s - the string to localize
        Returns:
        the localized string, or the original string if not found
      • getlnode

        public wprover.Language.lnode getlnode​(int n)
        Gets the language node with the specified index.
        Parameters:
        n - the index of the language node to get
        Returns:
        the language node with the specified index, or null if not found
      • combine

        public void combine​(Language lan)
        Combines the current language with another language.
        Parameters:
        lan - the Language instance to combine with