public class ISO639
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String[] |
codes |
private static java.util.Map<java.lang.String,java.lang.String> |
mapping |
Constructor and Description |
---|
ISO639() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
country(java.lang.String code)
get the name of the alpha-2 country code
|
static boolean |
exists(java.lang.String code)
see if the given country in alpha-2 country code exists
|
static java.lang.String |
userAgentLanguageDetection(java.lang.String userAgent)
analyse a user-agent string and return language as given in the agent string
|
private static final java.lang.String[] codes
private static java.util.Map<java.lang.String,java.lang.String> mapping
public static final java.lang.String country(java.lang.String code)
code,
- the mnemonic of the country in alpha-2public static final boolean exists(java.lang.String code)
code,
- the mnemonic of the country in alpha-2public static final java.lang.String userAgentLanguageDetection(java.lang.String userAgent)
userAgent
- string