| java.lang.Object org.dspace.core.I18nUtil
I18nUtil | public class I18nUtil (Code) | | 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
author: Bernadette Schlonsok and Claudia Juergen version: 1.0 |
getDefaultLicense | public static String getDefaultLicense(Context context)(Code) | | Get the appropriate localized version of the default.license according to language settings
Parameters: context - the current DSpace context fileName String - localized filename for default.license |
getDefaultLocale | public static Locale getDefaultLocale()(Code) | | Gets the default locale as defined in dspace.cfg If no default locale is
defined, the Locale of the JVM is used
defaultLocalethe default Locale for this DSpace instance |
getEPersonLocale | public static Locale getEPersonLocale(EPerson ep)(Code) | | Get the Locale for a specified EPerson. If the language is missing,
return the default Locale for the repository.
Parameters: ep - |
getEmailFilename | public static String getEmailFilename(Locale locale, String name)(Code) | | Get the appropriate localized version of an email template according to language settings
Parameters: locale - Locale for this request Parameters: name - String - base name of the email template templateName String - localized filename of an email template |
getInputFormsFileName | public static String getInputFormsFileName(Locale locale)(Code) | | Get the appropriate localized version of input-forms.xml according to language settings
Parameters: locale - Locale, the local to get the input-forms.xml for String - localized filename for input-forms.xml |
getMessage | public static String getMessage(String key) throws MissingResourceException(Code) | | et the i18n message string for a given key and use the default Locale
Parameters: key - String - name of the key to get the message for messageString of the message |
getMessage | public static String getMessage(String key, Locale locale) throws MissingResourceException(Code) | | Get the i18n message string for a given key and locale
Parameters: key - String - name of the key to get the message for Parameters: locale - Locale, to get the message for messageString of the message |
getMessage | public static String getMessage(String key, Context c) throws MissingResourceException(Code) | | Get the i18n message string for a given key and locale
Parameters: key - String - name of the key to get the message for Parameters: locale - Locale, to get the message for messageString of the message |
getSupportedLocale | public static Locale getSupportedLocale(Locale locale)(Code) | | Gets the appropriate supported Locale according for a given Locale If
no appropriate supported locale is found, the DEFAULTLOCALE is used
Parameters: locale - Locale to find the corresponding Locale supportedLocale Locale for session according to locales supported by this DSpace instance as set in dspace.cfg |
getSupportedLocales | public static Locale[] getSupportedLocales()(Code) | | get the available Locales for the User Interface as defined in dspace.cfg
returns an array of Locales or null
an array of supported Locales or null |
|
|