public class DefaultLocaleResolver extends Object implements LocaleResolver
LocaleResolver
LOCALE_KEY
. If it is not found, it returns the
locale included in the request.Modifier and Type | Field and Description |
---|---|
static String |
LOCALE_KEY
The attribute name that is used to store the current locale.
|
Constructor and Description |
---|
DefaultLocaleResolver() |
Modifier and Type | Method and Description |
---|---|
void |
init(Map<String,String> params)
Initializes the
LocaleResolver object. |
Locale |
resolveLocale(TilesRequestContext request)
Resolves the locale.
|
public static final String LOCALE_KEY
public void init(Map<String,String> params)
LocaleResolver
object. This method
must be called before the LocaleResolver.resolveLocale(TilesRequestContext)
method is called.init
in interface LocaleResolver
params
- A map of properties used to set up the resolver.public Locale resolveLocale(TilesRequestContext request)
resolveLocale
in interface LocaleResolver
request
- The Tiles request object.Copyright © 2016. All rights reserved.