Class LocaleSelectionSetup
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.i18n.selection.LocaleSelectionSetup
-
- All Implemented Interfaces:
EventListener,javax.servlet.ServletContextListener
public class LocaleSelectionSetup extends Object implements javax.servlet.ServletContextListener
Check the ConfigurationProperties for a forced locale, or for a comma-separate list of selectable locales. Create the appropriate Locale objects and store them in the ServletContext.
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTY_FORCE_LOCALEIf this is set, the locale is forced.static StringPROPERTY_SELECTABLE_LOCALESThis is the list of locales that the user may select.
-
Constructor Summary
Constructors Constructor Description LocaleSelectionSetup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontextDestroyed(javax.servlet.ServletContextEvent arg0)voidcontextInitialized(javax.servlet.ServletContextEvent sce)
-
-
-
Field Detail
-
PROPERTY_FORCE_LOCALE
public static final String PROPERTY_FORCE_LOCALE
If this is set, the locale is forced. No selection will be offered to the user, and browser locales will be ignored.- See Also:
- Constant Field Values
-
PROPERTY_SELECTABLE_LOCALES
public static final String PROPERTY_SELECTABLE_LOCALES
This is the list of locales that the user may select. There should be a national flag or symbol available for each supported locale.- See Also:
- Constant Field Values
-
-
Method Detail
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitializedin interfacejavax.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent arg0)
- Specified by:
contextDestroyedin interfacejavax.servlet.ServletContextListener
-
-