|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.httpgw.LanguagePreference
public class LanguagePreference
LanguagePreference contains methods used to parse HTTP Accept-Language strings and retrieve
the 'sub-parts' of the strings. These methods are for use when localizing a response to a
client HTTP request.
Supported API: true
Extendable: false
| Constructor Summary | |
|---|---|
LanguagePreference()
Supported API: true |
|
LanguagePreference(String language,
double qvalue)
Supported API: true |
|
| Method Summary | |
|---|---|
static Vector |
getAcceptLanguagePreferences(String HTTPAcceptLanguage)
getAcceptLanguagePreferences parses the HTTPAcceptLanguage string and builds a Vector of String objects to return. |
String |
getLanguage()
Returns the language string of the LanguagePreference object. |
static Locale |
getLocale(String aLanguageList)
This method will take a String of languages obtained from the request Accept-Language attribute and decide the most appropriate Windchill Supported Locale from the given set of languages. |
static Locale |
getLocale(Vector preferences)
This method will take a Vector of languages obtained from the request Accept-Language attribute and decide the most appropriate Windchill Supported Locale from the given set of languages. |
double |
getQualityValue()
Returns the qualtityValue of the LanguagePreference object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LanguagePreference()
public LanguagePreference(String language,
double qvalue)
| Method Detail |
|---|
public double getQualityValue()
public String getLanguage()
public static Vector getAcceptLanguagePreferences(String HTTPAcceptLanguage)
throws WTException
HTTPAcceptLanguage - String received from an HTTP request holding the Accept-Language value.
WTException - Thrown if a parsing error occurs.public static Locale getLocale(Vector preferences)
getLocale( getAcceptLanguagePreferences( request.getHeader("Accept-Language") ) );
preferences - The Vector list of languages from the browsers's
Accept-Language attribute.
public static Locale getLocale(String aLanguageList)
getLocale( request.getHeader("Accept-Language") );
aLanguageList - The list of languages from the browsers's
Accept-Language attribute.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||