public final class LocaleUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static Locale |
NULL_LOCALE
The "null" Locale, i.e.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
calculatePostfix(Locale locale)
Calculate the postfix to append to a filename to load the correct single
filename for that Locale.
|
static List<String> |
calculatePostfixes(Locale locale)
Calculate the postfixes along the search path from the base bundle to the
bundle specified by baseName and locale.
|
static String |
concatPostfix(String name,
String postfix)
Concat postfix to the name.
|
static Locale |
getParentLocale(Locale locale)
Returns the "parent" locale of a given locale.
|
public static final Locale NULL_LOCALE
public static List<String> calculatePostfixes(Locale locale)
locale - The locale.public static String calculatePostfix(Locale locale)
locale - The locale.public static String concatPostfix(String name, String postfix)
name - Filename.postfix - Postfix to add.public static Locale getParentLocale(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.Copyright © 2025. All rights reserved.