public final class LocaleUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Locale |
NULL_LOCALE
The "null" Locale, i.e.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
calculatePostfix(java.util.Locale locale)
Calculate the postfix to append to a filename to load the correct single
filename for that Locale.
|
static java.util.List<java.lang.String> |
calculatePostfixes(java.util.Locale locale)
Calculate the postfixes along the search path from the base bundle to the
bundle specified by baseName and locale.
|
static java.lang.String |
concatPostfix(java.lang.String name,
java.lang.String postfix)
Concat postfix to the name.
|
static java.util.Locale |
getParentLocale(java.util.Locale locale)
Returns the "parent" locale of a given locale.
|
public static final java.util.Locale NULL_LOCALE
public static java.util.List<java.lang.String> calculatePostfixes(java.util.Locale locale)
locale
- The locale.public static java.lang.String calculatePostfix(java.util.Locale locale)
locale
- The locale.public static java.lang.String concatPostfix(java.lang.String name, java.lang.String postfix)
name
- Filename.postfix
- Postfix to add.public static java.util.Locale getParentLocale(java.util.Locale locale)
Returns the "parent" locale of a given locale.
If the original locale is only language-based, the NULL_LOCALE
object is returned.
If the original locale is NULL_LOCALE
, then null
is returned.
locale
- The original locale.