|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.core.I18nUtil
public class I18nUtil
I18nUtil.java Some Utilities for i18n Support. - getting the default Locale for this DSpace Instance - getting all supported Locales for this DSpace Instance - getting email template, help file, input forms for a given Locale
| Field Summary | |
|---|---|
static Locale |
DEFAULTLOCALE
|
| Constructor Summary | |
|---|---|
I18nUtil()
|
|
| Method Summary | |
|---|---|
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)
et 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 locale |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Locale DEFAULTLOCALE
| Constructor Detail |
|---|
public I18nUtil()
| Method Detail |
|---|
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 Locale
public static String getInputFormsFileName(Locale locale)
locale - Locale, the local to get the input-forms.xml for
public static String getMessage(String key)
throws MissingResourceException
key - String - name of the key to get the message for
MissingResourceException
public static String getMessage(String key,
Locale locale)
throws MissingResourceException
key - String - name of the key to get the message forlocale - Locale, to get the message for
MissingResourceException
public static String getMessage(String key,
Context c)
throws MissingResourceException
key - String - name of the key to get the message forlocale - Locale, to get the message for
MissingResourceExceptionpublic static String getDefaultLicense(Context context)
context - the current DSpace context
public static String getEmailFilename(Locale locale,
String name)
locale - Locale for this requestname - String - base name of the email template
public static Locale[] parseLocales(String ll)
ll - locale list of comma-separated values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||