com.silverpeas.ui
Class DisplayI18NHelper

java.lang.Object
  extended by com.silverpeas.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 by I18NHelper.


Method Summary
static String getDefaultLanguage()
          Returns the default language used to display user interface (UI)
static List<String> getLanguages()
          Returns all languages available to display user interface
static String verifyLanguage(String language)
          Verifies if the given user language is handled by the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)

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)

verifyLanguage

public static String verifyLanguage(String language)
Verifies if the given user language is handled by the server.

Returns:
the given user language if it is handled by the server, the default user language otherwise.


Copyright © 2016 Silverpeas. All Rights Reserved.