Top Description Methods
org.springframework.context.i18n

public Interface LocaleContext

Known Direct Subinterfaces
org.springframework.context.i18n.TimeZoneAwareLocaleContext
Known Direct Implementers
org.springframework.context.i18n.SimpleLocaleContext
Imports
java.util.Locale, org.springframework.lang.Nullable

Strategy interface for determining the current Locale.

A LocaleContext instance can be associated with a thread via the LocaleContextHolder class.

Author
Juergen Hoeller
Since
1.2
See Also
LocaleContextHolder#getLocale(), TimeZoneAwareLocaleContext

Method Summary

Modifier and TypeMethod and Description
public Locale

Returns:

the current Locale, or null if no specific Locale associated
getLocale
()

Return the current Locale, which can be fixed or determined dynamically, depending on the implementation strategy.

Method Detail

getLocaleback to summary
public Locale getLocale()

Return the current Locale, which can be fixed or determined dynamically, depending on the implementation strategy.

Returns:Locale

the current Locale, or null if no specific Locale associated

Annotations
@Nullable