Class Languages
java.lang.Object
org.apache.commons.codec.language.bm.Languages
Language codes.
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:
- Language: a single string containing no whitespace
- End-of-line comments: Any occurrence of '//' will cause all text following on that line to be discarded as a comment.
- Multi-line comments: Any line starting with '/*' will start multi-line commenting mode. This will skip all content until a line ending in '*' and '/' is found.
- Blank lines: All blank lines will be skipped.
Ported from language.php
This class is immutable and thread-safe.
- Since:
- 1.6
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A set of languages.static final class
Some languages, explicitly enumerated. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final Languages.LanguageSet
Any/all languages.static final Languages.LanguageSet
No languages at all. -
Method Summary
Modifier and TypeMethodDescriptionstatic Languages
getInstance
(String languagesResourceName) static Languages
getInstance
(NameType nameType)
-
Field Details
-
ANY
- See Also:
-
NO_LANGUAGES
No languages at all. -
ANY_LANGUAGE
Any/all languages.
-
-
Method Details
-
getInstance
-
getInstance
-
getLanguages
-