Package com.jsql.util
Class I18nUtil
java.lang.Object
com.jsql.util.I18nUtil
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 Summary
Modifier and TypeMethodDescriptionstatic void
Verify if there is a language properties file corresponding to the current system language.static Locale
static ResourceBundle
static boolean
static void
setLocaleDefault
(ResourceBundle localeDefault) static String
valueByKey
(String key) Return the text corresponding to a i18n key in the properties.
-
Method Details
-
valueByKey
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
-
setLocaleDefault
-
getLocaleDefault
-
getLocaleRoot
-