net.fckeditor.localization.impl
Class AcceptLanguageHeaderResolver

java.lang.Object
  extended by net.fckeditor.localization.impl.AcceptLanguageHeaderResolver
All Implemented Interfaces:
LocaleResolver

public class AcceptLanguageHeaderResolver
extends Object
implements LocaleResolver

HTTP header implementation of the locale resolver. It resolves the current user locale by calling ServletRequest.getLocale() if and only if the Accept-Language header is not empty.

Version:
$Id: AcceptLanguageHeaderResolver.java 4785 2009-12-21 20:10:28Z mosipov $

Constructor Summary
AcceptLanguageHeaderResolver()
           
 
Method Summary
 Locale resolveLocale(HttpServletRequest request)
          Returns the locale of a given request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcceptLanguageHeaderResolver

public AcceptLanguageHeaderResolver()
Method Detail

resolveLocale

public Locale resolveLocale(HttpServletRequest request)
Description copied from interface: LocaleResolver
Returns the locale of a given request.

Specified by:
resolveLocale in interface LocaleResolver
Parameters:
request - the current request instance
Returns:
the locale of the request, null if the locale couldn't be resolved


Copyright © 2004-2010 Frederico Caldeira Knabben. All Rights Reserved.