org.ChinaVO.FITSManager
Class GUILang

java.lang.Object
  extended by org.ChinaVO.FITSManager.XMLRWer
      extended by org.ChinaVO.FITSManager.GUILang

public class GUILang
extends XMLRWer

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").

Version:
v1.0.0 2010-3-12 13:42:27
Author:
Fany

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

strGUILanguages

public java.lang.String[] strGUILanguages
Full names of all support languages of this application.(according to the ./lang/lang.xml)


strGUILangShortNames

public java.lang.String[] strGUILangShortNames
Short names of all support languages of this application.(according to the ./lang/lang.xml)


strGUILanguageName

public java.lang.String strGUILanguageName
Full name of application's current language.

Constructor Detail

GUILang

public GUILang(java.lang.String strLangShortName,
               java.lang.String strFolderPath)
Constructor of GUILang.

Parameters:
strLangShortName - the short name of the language, such as :en,zh
strFolderPath - path of the folder which storage the language files
Method Detail

GetLangName

public java.lang.String GetLangName()
get current language's short name:en,zh...

Returns:
current language's short name