Package org.apache.tiles.locale.impl
Class DefaultLocaleResolver
- java.lang.Object
-
- org.apache.tiles.locale.impl.DefaultLocaleResolver
-
- All Implemented Interfaces:
LocaleResolver
public class DefaultLocaleResolver extends java.lang.Object implements LocaleResolver
Default implementation ofLocaleResolver
It tries to take the locale from the session-scoped attributeLOCALE_KEY
. If it is not found, it returns the locale included in the request.- Version:
- $Rev: 887725 $ $Date: 2009-12-07 05:02:10 +1100 (Mon, 07 Dec 2009) $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LOCALE_KEY
The attribute name that is used to store the current locale.
-
Constructor Summary
Constructors Constructor Description DefaultLocaleResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Locale
resolveLocale(org.apache.tiles.request.Request request)
Resolves the locale.
-
-
-
Field Detail
-
LOCALE_KEY
public static final java.lang.String LOCALE_KEY
The attribute name that is used to store the current locale.- See Also:
- Constant Field Values
-
-
Method Detail
-
resolveLocale
public java.util.Locale resolveLocale(org.apache.tiles.request.Request request)
Resolves the locale.- Specified by:
resolveLocale
in interfaceLocaleResolver
- Parameters:
request
- The Tiles request object.- Returns:
- The current locale for the current request.
-
-