Package org.openxava.util
Class Locales
java.lang.Object
org.openxava.util.Locales
Access to the locale associated to the current thread.
- Author:
- Javier Paniza
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LocaleThe Locale associated to the current thread.static voidsetCurrent(Locale locale) Associated a Locale to the current thread.static voidsetCurrent(javax.servlet.http.HttpServletRequest request) Associated the Locale of the request to the current thread.
-
Constructor Details
-
Locales
public Locales()
-
-
Method Details
-
getCurrent
The Locale associated to the current thread.- Returns:
- Never null. If no locale associated, return default Locale.
-
setCurrent
Associated a Locale to the current thread. -
setCurrent
public static void setCurrent(javax.servlet.http.HttpServletRequest request) Associated the Locale of the request to the current thread.
-