Class DefaultLocaleProvider

  • All Implemented Interfaces:
    LocaleProvider

    public class DefaultLocaleProvider
    extends java.lang.Object
    implements LocaleProvider
    Default implementation of LocaleProvider. Loads locales from the classpath.
    Author:
    Michel Kraemer
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String retrieveLocale​(java.lang.String lang)
      Retrieves the serialized XML for the given locale from the classpath.
      • Methods inherited from class java.lang.Object

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

      • DefaultLocaleProvider

        public DefaultLocaleProvider()
    • Method Detail

      • retrieveLocale

        public java.lang.String retrieveLocale​(java.lang.String lang)
        Retrieves the serialized XML for the given locale from the classpath. For example, if the locale is en-US this method loads the file /locales-en-US.xml from the classpath.
        Specified by:
        retrieveLocale in interface LocaleProvider
        Parameters:
        lang - the locale identifier (e.g. "en" or "en-GB")
        Returns:
        the serializes XML of the given locale or null if there is no such locale