|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.util.LocaleUtility
public class LocaleUtility
A utility class for working with Locales.
Field Summary | |
---|---|
static java.util.Locale |
DEFAULT_LOCALE
Deprecated. use getDefaultLocale() now |
Constructor Summary | |
---|---|
LocaleUtility()
|
Method Summary | |
---|---|
static boolean |
areCompatible(java.util.Locale lhs,
java.util.Locale rhs)
Compatible is a looser matching than that provided by Locale.equals(). |
static java.util.Locale |
fromSpecification(java.lang.String localeSpecification)
Creates a locale based on a string specification. |
static java.util.Locale |
getDefaultLocale()
Gets the default locale specified as a global property. |
static java.util.Set<java.util.Locale> |
getLocalesInOrder()
Utility method that returns a collection of all openmrs system locales, the set includes the current logged in user's preferred locale if any is set, the default locale, allowed locales in the order they are specified in the 'allowed.locale.list' global property and 'en' at the very end of the set if it isn't yet among them. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final java.util.Locale DEFAULT_LOCALE
getDefaultLocale()
now
Constructor Detail |
---|
public LocaleUtility()
Method Detail |
---|
public static java.util.Locale getDefaultLocale()
public static boolean areCompatible(java.util.Locale lhs, java.util.Locale rhs)
lhs
- left hand side Localerhs
- right hand side Locale
public static java.util.Locale fromSpecification(java.lang.String localeSpecification)
localeSpecification
- encoded locale specification
public static java.util.Set<java.util.Locale> getLocalesInOrder()
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |