public class I18nUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static Locale |
DEFAULTLOCALE |
| Constructor and Description |
|---|
I18nUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getDefaultLicense(Context context)
Get the appropriate localized version of the default.license according to language settings
|
static Locale |
getDefaultLocale()
Gets the default locale as defined in dspace.cfg If no default locale is
defined, the Locale of the JVM is used
|
static String |
getEmailFilename(Locale locale,
String name)
Get the appropriate localized version of an email template according to language settings
|
static Locale |
getEPersonLocale(EPerson ep)
Get the Locale for a specified EPerson.
|
static String |
getInputFormsFileName(Locale locale)
Get the appropriate localized version of input-forms.xml according to language settings
|
static String |
getMessage(String key)
Get the i18n message string for a given key and use the default Locale.
|
static String |
getMessage(String key,
Context c)
Get the i18n message string for a given key and context
|
static String |
getMessage(String key,
Locale locale)
Get the i18n message string for a given key and locale
|
static Locale |
getSupportedLocale(Locale locale)
Gets the appropriate supported Locale according for a given Locale If
no appropriate supported locale is found, the DEFAULTLOCALE is used
|
static Locale[] |
getSupportedLocales()
get the available Locales for the User Interface as defined in dspace.cfg
returns an array of Locales or null
|
static Locale[] |
parseLocales(String ll)
Creates array of Locales from text list of locale-specifications.
|
public static final Locale DEFAULTLOCALE
public static Locale getDefaultLocale()
public static Locale getEPersonLocale(EPerson ep)
ep - public static Locale[] getSupportedLocales()
public static Locale getSupportedLocale(Locale locale)
locale - Locale to find the corresponding Localepublic static String getInputFormsFileName(Locale locale)
locale - Locale, the local to get the input-forms.xml forpublic static String getMessage(String key)
key - String - name of the key to get the message forpublic static String getMessage(String key, Locale locale)
key - String - name of the key to get the message forlocale - Locale, to get the message forpublic static String getMessage(String key, Context c)
key - String - name of the key to get the message forc - Context having the desired Localepublic static String getDefaultLicense(Context context)
context - the current DSpace contextpublic static String getEmailFilename(Locale locale, String name)
locale - Locale for this requestname - String - base name of the email templateCopyright © 2014 DuraSpace. All Rights Reserved.