Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.util
Class LanguageTags

    java.lang.Object
      org.apache.fop.util.LanguageTags

    public final class LanguageTags

extends java.lang.Object

Provides utility methods for manipulating language tags compliant with the RFC 3066 specification available at http://www.ietf.org/rfc/rfc3066.txt. A typical language tag is a 2-letter language code sometimes followed by a country code. For example: en, en-US.

Method Summary
`static java.lang.String` | `toLanguageTag(java.util.Locale locale)` Converts the given locale to an RFC 3066 compliant language tag.
`static java.util.Locale` | `toLocale(java.lang.String languageTag)` Converts an RFC 3066 compliant language tag to a locale.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### toLanguageTag

    public static java.lang.String toLanguageTag(java.util.Locale locale)

  Converts the given locale to an RFC 3066 compliant language tag.

  Parameters:
    `locale` - a locale
  Returns:
    the corresponding language tag

### toLocale

    public static java.util.Locale toLocale(java.lang.String languageTag)

  Converts an RFC 3066 compliant language tag to a locale.

  Parameters:
    `languageTag` - language tag to convert
  Returns:
    the corresponding locale

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.