|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nimbox.http.enhanced.LocaleHandler
public class LocaleHandler
Determines the preferred language. The handler requires configurations to specifies which user space keys to fetch and the order of checking the values. If the user is unauthenticated then the parameters from request are going to be fetch. Locale Keys Configuration The language configuration will contain a comma-separated list of user space keys. The configuration key is "locale.keys". For example, if the EnhancedDispatcher has been configured for the static protocol, the configuration for the associated LocaleHandler's locale keys will have the name: "com.nitido.nimbox.http.skinsetting.static.locale.keys". The order of the key in the list represent the order that they were checked. For example, a configuration value "key1, key2, key3" will tell the dispatcher to first check the user space value of key 1 first. If that value is null, then check the user space value of key2 and so on. If all the values from userspace for the configuration keys are null, then a default locale is being used. For example, if the dispatcher is configured for static protocol and it needs to search for the key "locale", "language" and "mylocale", the configuration will be: com.nitido.nimbox.http.skinsetting.static.locale.keys=locale,language,mylocale Default Locale Value Configuration The default locale can be specified using the configuration "locale.default". For example, if the EnhancedDispatcher has been configured for the dynamic protocol, the configuration for the associated LocaleHandler's default locale will have the name: "com.nitido.nimbox.http.skinsetting.dynamic.locale.default" If default locale from configuration is missing or empty, then the LOCALE_EN ("en") is assigned for preferred language.
Field Summary |
---|
Constructor Summary | |
---|---|
LocaleHandler(java.util.HashMap setting)
Default constructor. |
Method Summary | |
---|---|
java.lang.String |
getLocale(HttpNimletContainer container)
Returns the preffered language. |
java.util.Vector |
getLocaleKeys()
Get the available locale keys. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocaleHandler(java.util.HashMap setting)
Method Detail |
---|
public java.util.Vector getLocaleKeys()
public java.lang.String getLocale(HttpNimletContainer container)
container
- The HttpNimletContainer object
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.