|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ChinaVO.FITSManager.XMLRWer org.ChinaVO.FITSManager.GUILang
public class GUILang
Load the language information for the application. example:
GUILang m_gui = new GUILang("en"), "lang/");//"en" is an element in
"lang/lang.xml"
m_gui.getStringValue("lang/menu/file/exit","Exit");
The path is case sensitive.
example of en.xml:
<?xml version="1.0" encoding='GBK'?>
<lang name="English">
<menu name="Menu">
<file name="File">
<exit name="Exit" />
</file>
<option name="Option">
<lang name="Language" />
</option>
</menu>
</lang>
example of lang.xml:
<?xml version="1.0"?>
<lang>
<en name="English"
filename="en.xml" />
<zh name="¼òÌåÖÐÎÄ"
filename="zh.xml" />
</lang>
the directory's structure:
lang/
lang.xml
en.xml
zh.xml
when initialize a GUILang instance, program will read the
"lang/lang.xml" first to get the array of language short
name("en", "zh") and their real language
file("en.xml","zh.xml").
then, build the full path of the real language file("lang/en.xml").
finally, call the XMLRWer's functions to load the real language
file("lang/en.xml").
Field Summary | |
---|---|
java.lang.String[] |
strGUILangShortNames
Short names of all support languages of this application.(according to the ./lang/lang.xml) |
java.lang.String |
strGUILanguageName
Full name of application's current language. |
java.lang.String[] |
strGUILanguages
Full names of all support languages of this application.(according to the ./lang/lang.xml) |
Constructor Summary | |
---|---|
GUILang(java.lang.String strLangShortName,
java.lang.String strFolderPath)
Constructor of GUILang. |
Method Summary | |
---|---|
java.lang.String |
GetLangName()
get current language's short name:en,zh... |
Methods inherited from class org.ChinaVO.FITSManager.XMLRWer |
---|
getBooleanValue, getDoubleValue, getIntValue, getRootName, getStringValue, getValueAttrStr, getXMLPath, loadXML, saveXML, setSetting, setXMLPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String[] strGUILanguages
public java.lang.String[] strGUILangShortNames
public java.lang.String strGUILanguageName
Constructor Detail |
---|
public GUILang(java.lang.String strLangShortName, java.lang.String strFolderPath)
strLangShortName
- the short name of the language, such as :en,zhstrFolderPath
- path of the folder which storage the language filesMethod Detail |
---|
public java.lang.String GetLangName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |