public enum LocaleUtils extends Enum<LocaleUtils>
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
static LocaleUtils |
get() |
Locale |
getLocaleByIsoCode(String isoCode)
Returns a locale for language-only ("en") or language/country ("en_UK")
iso codes
|
Locale |
getLocaleFromDbString(String value) |
Locale |
getLocaleFromHttpInput(String str)
HTTP and Java do not use the same locale stuff
HTTP would say "de-de", but Java would want "de_DE".
|
static LocaleUtils |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LocaleUtils[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LocaleUtils INSTANCE
public static LocaleUtils[] values()
for (LocaleUtils c : LocaleUtils.values()) System.out.println(c);
public static LocaleUtils 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 nullpublic static LocaleUtils get()
public Locale getLocaleByIsoCode(String isoCode)
public Locale getLocaleFromHttpInput(String str)
str - the HTTP language inputCopyright (c) 2016-2017, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE.txt file in the repository.