Package org.wymiwyg.wrhapi.util

Examples of org.wymiwyg.wrhapi.util.AcceptLanguageHeaderEntry


         
            final URL requestBaseURL = ehRequest.getRequestURLWithoutParams();
            AcceptLanguagesIterator langIter = ehRequest.getAcceptLanguages();
            final List<Locale> localeList = new ArrayList<Locale>();
            while (langIter.hasNext()) {
                AcceptLanguageHeaderEntry current = (AcceptLanguageHeaderEntry) langIter
                        .next();
                Locale locale = current.getLocaleRange().getLocale();
                //TODO use ranges
                if (locale != null) {
                  localeList.add(locale);
                }
View Full Code Here


      }
    }
    List languageSelectionList = new ArrayList();
    AcceptLanguagesIterator acceptIter = request.getAcceptLanguages();
    while (acceptIter.hasNext()) {
      AcceptLanguageHeaderEntry current = acceptIter.nextAcceptLanguageHeader();
      Locale locale = current.getLocaleRange().getLocale();
      if (locale == null) {
        continue;
      }
      String abbreviation = locale.getLanguage();
      Resource languageResource = (Resource) supportedLanguageMap.get(abbreviation);
View Full Code Here

      langIter = request.getAcceptLanguages();
    } catch (HandlerException e) {
      throw new RuntimeException(e);
    }
    while (langIter.hasNext()) {
      AcceptLanguageHeaderEntry current = langIter
          .nextAcceptLanguageHeader();
      if (current.getLocaleRange().match(locale)) {
        return current.getQ();
      }
    }
    return 0;
  }
View Full Code Here

TOP

Related Classes of org.wymiwyg.wrhapi.util.AcceptLanguageHeaderEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.