public class SimpleLocaleContext extends Object implements LocaleContext
LocaleContext interface,
always returning a specified Locale.LocaleContextHolder.setLocaleContext(org.springframework.context.i18n.LocaleContext),
LocaleContextHolder.getLocale(),
SimpleTimeZoneAwareLocaleContext| 构造器和说明 |
|---|
SimpleLocaleContext(Locale locale)
Create a new SimpleLocaleContext that exposes the specified Locale.
|
public SimpleLocaleContext(@Nullable
Locale locale)
getLocale() call will return this Locale.locale - the Locale to expose, or null for no specific one@Nullable public Locale getLocale()
LocaleContextgetLocale 在接口中 LocaleContextnull if no specific Locale associated