| java.lang.Object net.jforum.util.I18n
I18n | public class I18n (Code) | | I18n (Internationalization) class implementation. Does nothing of special, just loads the
messages into memory and provides a static method to acess them.
author: Rafael Steil author: James Yong version: $Id: I18n.java,v 1.36 2007/07/08 14:11:43 rafaelsteil Exp $ |
CANNOT_DELETE_BANNER | final public static String CANNOT_DELETE_BANNER(Code) | | |
CANNOT_DELETE_CATEGORY | final public static String CANNOT_DELETE_CATEGORY(Code) | | |
CANNOT_DELETE_GROUP | final public static String CANNOT_DELETE_GROUP(Code) | | |
changeBoardDefault | public static void changeBoardDefault(String newDefaultLanguage)(Code) | | |
contains | public static boolean contains(String language)(Code) | | Check whether the language is loaded in i18n.
Parameters: language - String boolean |
getInstance | public static I18n getInstance()(Code) | | Gets the singleton
Instance of I18n class |
getMessage | public static String getMessage(String localeName, String messageName, Object params)(Code) | | Gets a I18N (internationalized) message.
Parameters: localeName - The locale name to retrieve the messages from Parameters: messageName - The message name to retrieve. Must be a valid entry into the file specified byi18n.file property. Parameters: params - Parameters needed by some messages. The messages with extra parameters areformated according to java.text.MessageFormatspecification String With the message |
getMessage | public static String getMessage(String messageName, SimpleSequence params)(Code) | | |
getMessage | public static String getMessage(String localeName, String m)(Code) | | Gets an I18N (internationalization) message.
Parameters: m - The message name to retrieve. Must be a valid entry into the file specified byi18n.file property. String With the message Parameters: localeName - String |
getUserLanguage | public static String getUserLanguage()(Code) | | Gets the language name for the current request. The method will first look at
UserSession.getLang and use it if any value is found. Otherwise, the default board
language will be used
String |
languageExists | public static boolean languageExists(String language)(Code) | | Check if the given language exist.
Parameters: language - The language to check true if the language is a valid and registered translation. |
load | public static synchronized void load()(Code) | | Load the default I18n file
|
load | public static void load(String localeName)(Code) | | Loads a new locale. If localeName is either null or empty, or if the locale is
already loaded, the method will return without executing any code.
Parameters: localeName - The locale name to load |
reset | public static void reset()(Code) | | |
|
|