public static enum LocaleMatcher.Direction extends Enum<LocaleMatcher.Direction>
For example, consider a web application with the UI in a given language, with a link to another, related web app. The link should include the UI language, and the target server may also use the client’s Accept-Language header data. The target server has its own list of supported languages. One may want to favor UI language consistency, that is, if there is a decent match for the original UI language, we want to use it, but not if it is merely a fallback.
LocaleMatcher.Builder.setDirection(LocaleMatcher.Direction)
Enum Constant and Description |
---|
ONLY_TWO_WAY
Locale matching limited to two-way matches including e.g.
|
WITH_ONE_WAY
Locale matching includes one-way matches such as Breton→French.
|
Modifier and Type | Method and Description |
---|---|
static LocaleMatcher.Direction |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LocaleMatcher.Direction[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LocaleMatcher.Direction WITH_ONE_WAY
public static final LocaleMatcher.Direction ONLY_TWO_WAY
public static LocaleMatcher.Direction[] values()
for (LocaleMatcher.Direction c : LocaleMatcher.Direction.values()) System.out.println(c);
public static LocaleMatcher.Direction valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2016 Unicode, Inc. and others.