Package org.openxava.util
Class Locales
- java.lang.Object
-
- org.openxava.util.Locales
-
public class Locales extends java.lang.Object
Access to the locale associated to the current thread.- Author:
- Javier Paniza
-
-
Constructor Summary
Constructors Constructor Description Locales()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Locale
getCurrent()
The Locale associated to the current thread.static void
setCurrent(java.util.Locale locale)
Associated a Locale to the current thread.static void
setCurrent(javax.servlet.http.HttpServletRequest request)
Associated the Locale of the request to the current thread.
-
-
-
Method Detail
-
getCurrent
public static java.util.Locale getCurrent()
The Locale associated to the current thread.- Returns:
- Never null. If no locale associated, return default Locale.
-
setCurrent
public static void setCurrent(java.util.Locale locale)
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.
-
-