Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Locales

        public Locales()
    • 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.