All Packages Class Hierarchy This Package Previous Next Index
Class multilizer.DatabaseDictionary
java.lang.Object
|
+----multilizer.Dictionary
|
+----multilizer.LoginDictionary
|
+----multilizer.DatabaseDictionary
- public class DatabaseDictionary
- extends LoginDictionary
A dictionary component that gets language and translation data from database tables.
The dictionary uses JDBC to access the database.
Set the
Driver
property contain the class name of the JDBC driver.
Set the
URL
property to contain the JDBC data source name.
Set the
User
and the
Password
properties specify the user account of the database.
Set the
LanguageTable
and the
TranslationTable
properties to contains the name of the dictionary tables.
Call the
open
method to open the dictionary.
Language Table format
Translation Table format
An example:
DatabaseDictionary dictionary = new DatabaseDictionary();
dictionary.setDriver("interbase.interclient.Driver");
dictionary.setURL("jdbc:interbase://multilizer.com/d:/database/javadcalc.gdb");
dictionary.setUser("dcalc");
dictionary.setPassword("dcalc");
dictionary.setLanguageTable("LanguageTable");
dictionary.setTranslationTable("TranslationTable");
dictionary.open();
- See Also:
- ServerDictionary
-
ENGLISH_NAME_C
- The index of the English language name in the language table.
-
ISO_COUNTRIES_C
- The index of the ISO country codes in the language table.
-
ISO_DEFAULT_COUNTRY_C
- The index of the default ISO country code in the language table.
-
ISO_LANGUAGE_C
- The index of the ISO language code in the language table.
-
NATIVE_NAME_C
- The index of the native language name in the language table.
-
TEST_C
- The index of the test flag in the language table.
-
DatabaseDictionary()
-
-
close()
- Closes the dictionary.
-
getDriver()
- Gets the JDBC driver class.
-
getLanguage(ResultSet)
-
-
getLanguageCount()
- Gets the amount of the languages in the dictionary.
-
getLanguageData(int)
- Gets the specified language.
-
getLanguageDatas()
- Gets the all languages.
-
getLanguageTable()
- Gets the language table name.
-
getTranslationTable()
- Gets the translation table name.
-
languageChanged(boolean, boolean)
- Dictionary calls this method after the current language has been changed.
-
open()
- Opens the dictionary.
-
setDriver(String)
- Sets the JDBC driver class.
-
setLanguageTable(String)
- Sets the language table name.
-
setTranslationTable(String)
- Sets the translation table name.
-
translateString(String)
- Returns the translation of the native string in the current language.
-
translateString(String, String, String)
- Returns the translation of the context sensitive native string in the current language.
ENGLISH_NAME_C
public final int ENGLISH_NAME_C
- The index of the English language name in the language table.
NATIVE_NAME_C
public final int NATIVE_NAME_C
- The index of the native language name in the language table.
TEST_C
public final int TEST_C
- The index of the test flag in the language table.
ISO_LANGUAGE_C
public final int ISO_LANGUAGE_C
- The index of the ISO language code in the language table.
ISO_COUNTRIES_C
public final int ISO_COUNTRIES_C
- The index of the ISO country codes in the language table.
ISO_DEFAULT_COUNTRY_C
public final int ISO_DEFAULT_COUNTRY_C
- The index of the default ISO country code in the language table.
DatabaseDictionary
public DatabaseDictionary()
open
public void open()
- Opens the dictionary.
- Overrides:
- open in class Dictionary
close
public void close()
- Closes the dictionary.
- Overrides:
- close in class Dictionary
languageChanged
protected void languageChanged(boolean languageChanged,
boolean localeChanged)
- Dictionary calls this method after the current language has been changed.
- Overrides:
- languageChanged in class Dictionary
getLanguageCount
public int getLanguageCount()
- Gets the amount of the languages in the dictionary.
- Overrides:
- getLanguageCount in class Dictionary
getLanguage
protected Language getLanguage(ResultSet rs) throws Exception
getLanguageData
public Language getLanguageData(int index)
- Gets the specified language.
- Overrides:
- getLanguageData in class Dictionary
getLanguageDatas
public Language[] getLanguageDatas()
- Gets the all languages.
- Overrides:
- getLanguageDatas in class Dictionary
translateString
protected String translateString(String str)
- Returns the translation of the native string in the current language.
- Overrides:
- translateString in class Dictionary
translateString
protected String translateString(String str,
String form,
String component)
- Returns the translation of the context sensitive native string in the current language.
- Overrides:
- translateString in class Dictionary
setDriver
public void setDriver(String value)
- Sets the JDBC driver class.
e.g. "interbase.interclient.Driver" for InterBase.
getDriver
public String getDriver()
- Gets the JDBC driver class.
setLanguageTable
public void setLanguageTable(String value)
- Sets the language table name.
- See Also:
- setTranslationTable
getLanguageTable
public String getLanguageTable()
- Gets the language table name.
- See Also:
- getTranslationTable
setTranslationTable
public void setTranslationTable(String value)
- Sets the translation table name.
- See Also:
- setLanguageTable
getTranslationTable
public String getTranslationTable()
- Gets the translation table name.
- See Also:
- getLanguageTable
All Packages Class Hierarchy This Package Previous Next Index