public class Languages extends Object
Language codes are typically loaded from resource files. These are UTF-8 encoded text files. They are systematically named following the pattern:
org/apache/commons/codec/language/bm/${NameType.getName()
languages.txt
The format of these resources is the following:
Ported from language.php
This class is immutable and thread-safe.
Modifier and Type | Class and Description |
---|---|
static class |
Languages.LanguageSet
A set of languages.
|
static class |
Languages.SomeLanguages
Some languages, explicitly enumerated.
|
Modifier and Type | Field and Description |
---|---|
static String |
ANY |
static Languages.LanguageSet |
ANY_LANGUAGE
Any/all languages.
|
static Languages.LanguageSet |
NO_LANGUAGES
No languages at all.
|
Modifier and Type | Method and Description |
---|---|
static Languages |
getInstance(NameType nameType) |
static Languages |
getInstance(String languagesResourceName) |
Set<String> |
getLanguages() |
public static final String ANY
public static final Languages.LanguageSet NO_LANGUAGES
public static final Languages.LanguageSet ANY_LANGUAGE
public static Languages getInstance(NameType nameType)
public static Languages getInstance(String languagesResourceName)
public Set<String> getLanguages()
Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.