|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.libideas.server.LocaleMatcher
public class LocaleMatcher
A class to choose the best locale given a list of supported locales and an HTTP Accept-Language header.
Constructor Summary | |
---|---|
LocaleMatcher(java.io.InputStream localeListStream)
Construct a locale matcher given a stream with a list of locales, one per line. |
Method Summary | |
---|---|
java.lang.String |
findBestMatch(java.lang.String acceptLang)
Select the best match from the list of available locales. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocaleMatcher(java.io.InputStream localeListStream) throws java.io.IOException
LocaleListLinker
.
localeListStream
- input stream to read locale list from -- if null,
no locales are read.
java.io.IOException
- if an error occurs reading the streamMethod Detail |
---|
public java.lang.String findBestMatch(java.lang.String acceptLang)
acceptLang
- the Accept-Languages header
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |