Class LocaleConfig

    • Field Detail

      • DEFAULT_LOCALE

        public static final java.util.Locale DEFAULT_LOCALE
        The default Locale to be used when none is specified.
    • Constructor Detail

      • LocaleConfig

        public LocaleConfig()
    • Method Detail

      • configure

        protected void configure​(ValueParser values)
        Does the actual configuration. This is protected, so subclasses may share the same ValueParser and call configure at any time, while preventing templates from doing so when configure(Map) is locked.
        Overrides:
        configure in class SafeConfig
        Parameters:
        values - configuration values
      • getLocale

        public java.util.Locale getLocale()
        This returns the configured default Locale for this tool.
        Returns:
        the default Locale
      • setLocale

        protected void setLocale​(java.util.Locale locale)
        Sets the default locale for this instance.
        Parameters:
        locale - default locale to use
      • toLocale

        public java.util.Locale toLocale​(java.lang.Object value)
        Parameters:
        value - the object to be converted
        Returns:
        a Locale for the specified value or null if the value is null or the conversion failed
        Since:
        VelocityTools 3.0