接口的使用
cn.taketoday.core.i18n.LocaleContext
使用LocaleContext的程序包
程序包
说明
Abstraction for determining the current Locale,
plus global holder that exposes a thread-bound Locale.
-
cn.taketoday.core.i18n中LocaleContext的使用
修饰符和类型类说明classSimple implementation of theLocaleContextinterface, always returning a specifiedLocale.classSimple implementation of theTimeZoneAwareLocaleContextinterface, always returning a specifiedLocaleandTimeZone.修饰符和类型方法说明static LocaleContextLocaleContextHolder.getLocaleContext()Return the LocaleContext associated with the current thread, if any.参数类型为LocaleContext的cn.taketoday.core.i18n中的方法修饰符和类型方法说明static LocaleLocaleContextHolder.getLocale(LocaleContext localeContext) Return the Locale associated with the given user context, if any, or the system default Locale otherwise.static TimeZoneLocaleContextHolder.getTimeZone(LocaleContext localeContext) Return the TimeZone associated with the given user context, if any, or the system default TimeZone otherwise.static voidLocaleContextHolder.setLocaleContext(LocaleContext localeContext) Associate the given LocaleContext with the current thread, not exposing it as inheritable for child threads.static voidLocaleContextHolder.setLocaleContext(LocaleContext localeContext, boolean inheritable) Associate the given LocaleContext with the current thread.