|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.util.LocaleUtils
public class LocaleUtils
Utility methods for Locales
| Method Summary | |
|---|---|
static URL |
getResource(String path,
Locale locale)
Get a resource using a locale. |
static InputStream |
getResourceAsStream(String path,
Locale locale)
Get a resource using a locale. |
static String |
getResourceName(String name,
Locale locale)
Get a resource name according to the locale. |
static String |
getResourceName(String name,
Locale locale,
ELocaleMode localeMode)
Get a resource name according to the locale and a given mode. |
static boolean |
isMoreSpecific(Locale localeA,
Locale localeB)
Tests if localeA is more specific than localeB. |
static Locale |
parseLocale(String value)
Parse a Locale. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Locale parseLocale(String value)
Locale.toString(). For example, fr_FR for French (France).
value - Text to parse
null if the value is
null or empty.Locale.toString()
public static InputStream getResourceAsStream(String path,
Locale locale)
path - Path to look forlocale - Locale to look for
null is not found.getResourceName(String, Locale)
public static URL getResource(String path,
Locale locale)
path - Path to look forlocale - Locale to look for
null is not found.getResourceName(String, Locale)
public static String getResourceName(String name,
Locale locale)
name - Name of the resourcelocale - Locale to be used
public static String getResourceName(String name,
Locale locale,
ELocaleMode localeMode)
name - Name of the resourcelocale - Locale to be usedlocaleMode - Indicates how the locale parameters must be used or not
getResourceName(String, Locale)
public static boolean isMoreSpecific(Locale localeA,
Locale localeB)
localeA is more specific than localeB.
A locale is more specific if it defines supplementary elements (country)
while the language is the same.
localeA - First localelocaleB - Second locale
true if the localeA is more specific
than localeB
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||