Class LocaleParser

java.lang.Object
io.sf.jclf.util.locale.LocaleParser

public class LocaleParser extends Object
Parses a String for a Locale.
  • Constructor Details

    • LocaleParser

      public LocaleParser()
  • Method Details

    • parseLocale

      public static Locale parseLocale(String loc)
      Parses a String to return a Locale.
      Parameters:
      loc - a String with the locale specification
      Returns:
      the corresponding Locale object
    • parseHttpLocale

      public static Locale parseHttpLocale(String loc)
      Parses an HTTP accept-language String to return a Locale.
      Parameters:
      loc - an HTTP accept-language String with the locale specification
      Returns:
      the corresponding Locale object