|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.util.Messages
Class managing all the texts, messages, button names, etc. which can be
written in french or english.
This class needs first to load a Parameters file which internal name must
be "msg_and_texts". This parameter file can contain several sections containing
independant messages and texts. Each entry has the syntax:
MSGNAME = texte francais/english text
'/' is the separator. Every section can define its own in an entry 'separator = x'
Field Summary | |
private static java.lang.String |
DEFAULT_SEPARATOR
|
static int |
ENGLISH
|
static int |
FRANCAIS
|
private static java.lang.String[] |
langName
|
private static int |
language
|
private static Parameters |
msgTable
|
private static java.lang.String |
paramName
|
private static java.lang.String |
SEPARATOR_KEY
|
Constructor Summary | |
Messages()
|
Method Summary | |
static java.lang.String |
get(java.lang.String key)
get a message in the current language |
static java.lang.String |
get(java.lang.String sect,
java.lang.String key)
get a message in the current language |
static java.lang.String |
getLanguage()
Returns the currently implemented language |
private static void |
loadLanguage()
Creates the 'language' Parameters object with the messages corresponding to the current language |
static void |
setLanguage(int lang)
Changes the language and (re)loads the right messages |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FRANCAIS
public static final int ENGLISH
private static final java.lang.String[] langName
private static final java.lang.String SEPARATOR_KEY
private static final java.lang.String DEFAULT_SEPARATOR
private static java.lang.String paramName
private static int language
private static Parameters msgTable
Constructor Detail |
public Messages()
Method Detail |
public static void setLanguage(int lang)
lang
- language to implement (Messages.FRANCAIS, Messages.ENGLISH)public static java.lang.String getLanguage()
private static void loadLanguage()
public static java.lang.String get(java.lang.String key)
key
- name of the message
public static java.lang.String get(java.lang.String sect, java.lang.String key)
sect
- message sectionkey
- name of the message
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |