Package com.jsql.util

Class I18nUtil

java.lang.Object
com.jsql.util.I18nUtil

public class I18nUtil extends Object
Utility class managing different text translations like English, Chinese and Arabic. It retrieves text in the current language of the system and also the one choice manually by user. If the current system language is not supported then the user is proposed to use the community translation protocol.
  • Method Details

    • valueByKey

      public static String valueByKey(String key)
      Return the text corresponding to a i18n key in the properties.
      Parameters:
      key - a i18n key in the properties
      Returns:
      text corresponding to the key
    • checkCurrentLanguage

      public static void checkCurrentLanguage()
      Verify if there is a language properties file corresponding to the current system language. If not then it invites the user to use the translation process.
    • isAsian

      public static boolean isAsian(Locale newLocale)
    • setLocaleDefault

      public static void setLocaleDefault(ResourceBundle localeDefault)
    • getLocaleDefault

      public static Locale getLocaleDefault()
    • getLocaleRoot

      public static ResourceBundle getLocaleRoot()