Package com.pnfsoftware.jeb.client
Class S
java.lang.Object
com.pnfsoftware.jeb.client.S
Internationalized strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
static Locale
static String
static String[]
getDisplayStrings
(Locale loc) static String
getLanguageName
(String langcode) static Locale
getLocaleFromCode
(String langcode) static boolean
static boolean
static String
Retrieve a localized string.static boolean
setCurrentLanguage
(String langcode) static String
testL
(int id)
-
Constructor Details
-
S
public S()
-
-
Method Details
-
getLanguageName
-
getAvailableLanguages
-
isDefaultEnglish
public static boolean isDefaultEnglish() -
isCurrentEnglish
public static boolean isCurrentEnglish() -
getDefaultLanguage
- Returns:
- a language code, such as "en"
-
getCurrentLanguage
- Returns:
- a language code, such as "en"
-
setCurrentLanguage
- 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
-
L
Retrieve a localized string. The preferred locale is the current program's, specified viasetCurrentLanguage(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
- Parameters:
s
- English stringlangcode
- language code- Returns:
- the localized string, potentially null if nothing was found
-
getLocaleFromCode
- 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
- 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
-