Package org.silverpeas.core.ui
Class DisplayI18NHelper
- java.lang.Object
-
- org.silverpeas.core.ui.DisplayI18NHelper
-
public class DisplayI18NHelper extends Object
This class permits to handle the different languages that a user can choose to display the labels of the application.
Be careful, this class handles possible user languages and not possible content languages.
The different content languages are managed byorg.silverpeas.util.i18n.I18NHelper
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getDefaultLanguage()
Returns the default language used to display user interface (UI)static ZoneId
getDefaultZoneId()
Returns the default zone id used dor user interface (UI)static List<String>
getLanguages()
Returns all languages available to display user interfacestatic List<String>
getZoneIds()
Returns all zone identifiers available for user interfacestatic String
verifyLanguage(String language)
Verifies if the given user language is handled by the server.static ZoneId
verifyZoneId(String zoneId)
Verifies if the given user zone id is handled by the server.
-
-
-
Method Detail
-
getDefaultLanguage
public static String getDefaultLanguage()
Returns the default language used to display user interface (UI)- Returns:
- a String (ie : 'fr', 'en' or another two-letters code)
-
getDefaultZoneId
public static ZoneId getDefaultZoneId()
Returns the default zone id used dor user interface (UI)- Returns:
- an instance of
ZoneId
.
-
getLanguages
public static List<String> getLanguages()
Returns all languages available to display user interface- Returns:
- a List of String (ie : 'fr', 'en' or another two-letters code)
-
getZoneIds
public static List<String> getZoneIds()
Returns all zone identifiers available for user interface- Returns:
- a List of String.
-
verifyLanguage
public static String verifyLanguage(String language)
Verifies if the given user language is handled by the server.- Parameters:
language
- the language to verify- Returns:
- the given user language if it is handled by the server, the default user language otherwise.
-
-