Class JavaLocalizerFactory


  • public class JavaLocalizerFactory
    extends LocalizerFactory
    Default factory for number/date localizers for the Java platform
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      JavaLocalizerFactory copy()
      Copy the state of this factory to create a new LocalizerFactory
      Numberer getNumberer​(java.lang.String language, java.lang.String country)
      Get the numberer for a given language
      void setBuiltInLocalizationClasses()
      Set the names of all the system-supplied localization classes
      void setLanguageProperties​(java.lang.String lang, java.util.Properties properties)
      Set properties for a particular language.
      void setLocalizationClass​(java.lang.String language, java.lang.String className)
      Set the name of the Localization class to be used for a particular language
      • Methods inherited from class java.lang.Object

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

      • JavaLocalizerFactory

        public JavaLocalizerFactory​(Configuration config)
    • Method Detail

      • setLanguageProperties

        public void setLanguageProperties​(java.lang.String lang,
                                          java.util.Properties properties)
        Set properties for a particular language. The properties available are specific to the LocalizerFactory in use. Default implementation does nothing.
        Overrides:
        setLanguageProperties in class LocalizerFactory
        Parameters:
        lang - the language
        properties - properties of this language
        Since:
        9.2
      • setLocalizationClass

        public void setLocalizationClass​(java.lang.String language,
                                         java.lang.String className)
        Set the name of the Localization class to be used for a particular language
        Parameters:
        language - the language code, in ISO format, for example "fr" or "fr-CA"
        className - the name of the localization class. This must be a class that implements the interface Numberer; however, no error is reported if the class cannot be loaded or does not implement this interface; the system simply falls back to using the default localization class.
        Since:
        9.2
      • setBuiltInLocalizationClasses

        public void setBuiltInLocalizationClasses()
        Set the names of all the system-supplied localization classes
      • getNumberer

        public Numberer getNumberer​(java.lang.String language,
                                    java.lang.String country)
        Get the numberer for a given language
        Specified by:
        getNumberer in class LocalizerFactory
        Parameters:
        language - the language code (for example "de" or "en-GB"
        country - the country, as used in format-date(). This is not the country associated with the language, but the one associated with the date to be formatted. It is primarily used to determine a civil time zone name.
        Returns:
        the appropriate numberer, or null if none is available (in which case the English numberer will be used)