Class S

java.lang.Object
com.pnfsoftware.jeb.client.S

public class S extends Object
Internationalized strings.
  • Constructor Details

    • S

      public S()
  • Method Details

    • getLanguageName

      public static String getLanguageName(String langcode)
    • getAvailableLanguages

      public static List<String> getAvailableLanguages()
    • isDefaultEnglish

      public static boolean isDefaultEnglish()
    • isCurrentEnglish

      public static boolean isCurrentEnglish()
    • getDefaultLanguage

      public static String getDefaultLanguage()
      Returns:
      a language code, such as "en"
    • getCurrentLanguage

      public static String getCurrentLanguage()
      Returns:
      a language code, such as "en"
    • setCurrentLanguage

      public static boolean setCurrentLanguage(String langcode)
      Parameters:
      langcode - a language code, such as "en"
      Returns:
      true if the language is supported and was successfully set to be the current language
    • getCurrentLocale

      public static Locale getCurrentLocale()
    • L

      public static String L(String s)
      Retrieve a localized string. The preferred locale is the current program's, specified via setCurrentLanguage(String); if none is available, a localized string in the system's default locale is checked; if nothing is available, the source string in English is returned.
      Parameters:
      s - the source string in English
      Returns:
      the localized string, or the source string if none was found
    • get

      public static String get(String s, String langcode)
      Parameters:
      s - English string
      langcode - language code
      Returns:
      the localized string, potentially null if nothing was found
    • getLocaleFromCode

      public static Locale getLocaleFromCode(String langcode)
      Parameters:
      langcode - a language code using the following format: lang_[COUNTRY]_[Variant]. The country and variant fields are optional. Examples: "fr", "en_US", "zh__Hans", "zh_TW_Hant"
      Returns:
      the locale for the language code
    • getDisplayStrings

      public static String[] getDisplayStrings(Locale loc)
      Parameters:
      loc - a locale L
      Returns:
      an array with two strings: the locale L's display language using L, the locale L's display language using the system default locale
    • testL

      public static String testL(int id)