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 SummaryNested ClassesModifier and TypeClassDescriptionstatic classA set of languages.static final classSome languages, explicitly enumerated.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringMarker for any language.static final Languages.LanguageSetAny/all languages.static final Languages.LanguageSetNo languages at all.
- 
Method SummaryModifier and TypeMethodDescriptionstatic LanguagesgetInstance(String languagesResourceName) Gets a new instance for the given resource name.static LanguagesgetInstance(NameType nameType) Gets an instance for the given name type.Gets the language set.
- 
Field Details- 
ANYMarker for any language.- See Also:
 
- 
NO_LANGUAGESNo languages at all.
- 
ANY_LANGUAGEAny/all languages.
 
- 
- 
Method Details- 
getInstanceGets an instance for the given name type.- Parameters:
- nameType- The name type to lookup.
- Returns:
- an instance for the given name type.
 
- 
getInstanceGets a new instance for the given resource name.- Parameters:
- languagesResourceName- the resource name to lookup.
- Returns:
- a new instance.
 
- 
getLanguagesGets the language set.- Returns:
- the language set.
 
 
-