类 AbstractLocaleContextResolver
java.lang.Object
cn.taketoday.web.i18n.AbstractLocaleResolver
cn.taketoday.web.i18n.AbstractLocaleContextResolver
- 所有已实现的接口:
LocaleContextResolver,LocaleResolver
- 直接已知子类:
FixedLocaleResolver,SessionLocaleResolver
public abstract class AbstractLocaleContextResolver
extends AbstractLocaleResolver
implements LocaleContextResolver
Abstract base class for
LocaleContextResolver implementations.
Provides support for a default locale and a default time zone.
Also provides pre-implemented versions of resolveLocale(cn.taketoday.web.RequestContext) and setLocale(cn.taketoday.web.RequestContext, java.util.Locale),
delegating to LocaleContextResolver.resolveLocaleContext(cn.taketoday.web.RequestContext) and LocaleContextResolver.setLocaleContext(cn.taketoday.web.RequestContext, cn.taketoday.core.i18n.LocaleContext).
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
字段概要
字段从接口继承的字段 cn.taketoday.web.LocaleResolver
BEAN_NAME -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Return the default TimeZone that this resolver is supposed to fall back to, if any.resolveLocale(RequestContext request) Resolve the current locale via the given request.voidsetDefaultTimeZone(TimeZone defaultTimeZone) Set a default TimeZone that this resolver will return if no other time zone found.voidsetLocale(RequestContext request, Locale locale) Set the current locale to the given one.从类继承的方法 cn.taketoday.web.i18n.AbstractLocaleResolver
getDefaultLocale, setDefaultLocale从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.taketoday.web.LocaleContextResolver
resolveLocaleContext, setLocaleContext
-
字段详细资料
-
defaultTimeZone
-
-
构造器详细资料
-
AbstractLocaleContextResolver
public AbstractLocaleContextResolver()
-
-
方法详细资料
-
setDefaultTimeZone
Set a default TimeZone that this resolver will return if no other time zone found. -
getDefaultTimeZone
Return the default TimeZone that this resolver is supposed to fall back to, if any. -
resolveLocale
从接口复制的说明:LocaleResolverResolve the current locale via the given request. Can return a default locale as fallback in any case.- 指定者:
resolveLocale在接口中LocaleResolver- 参数:
request- the request to resolve the locale for- 返回:
- the current locale (never
null)
-
setLocale
从接口复制的说明:LocaleResolverSet the current locale to the given one.- 指定者:
setLocale在接口中LocaleResolver- 参数:
request- the request to be used for locale modificationlocale- the new locale, ornullto clear the locale
-