All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class multilizer.ResourceDictionary

java.lang.Object
   |
   +----multilizer.Dictionary
           |
           +----multilizer.BundleDictionary
                   |
                   +----multilizer.ResourceDictionary

public class ResourceDictionary
extends BundleDictionary
A dictionary component that gets dictionary data from Java's property files.

Set the LanguageFileName property to contain the file name of the language table file name. You can also set the dictionary read the table data from streams. Implement the TextStreamListener interface and set it to listen the dictionary by calling the addLanguageStreamListener method. The stream must contain the same Unicode data as the language file.

Set the ResourceName property to contain the name of the resource. Call the open method to open the dictionary.


An example:
 ResourceDictionary dictionary = new ResourceDictionary();
dictionary.setLanguageFileName("dictionary.txt"); dictionary.setResourceName("dictionary"); try { dictionary.open(); } catch (Exception e) { }

See Also:
BinaryDictionary, TextDictionary

Variable Index

 o resourceBundle

Constructor Index

 o ResourceDictionary()

Method Index

 o languageChanged(boolean, boolean)
Dictionary calls this method after the current language has been changed.
 o translateString(String)
Returns the translation of the native string in the current language.

Variables

 o resourceBundle
 protected ResourceBundle resourceBundle

Constructors

 o ResourceDictionary
 public ResourceDictionary()

Methods

 o languageChanged
 protected void languageChanged(boolean languageChanged,
                                boolean localeChanged) throws Exception
Dictionary calls this method after the current language has been changed.

Overrides:
languageChanged in class Dictionary
 o translateString
 protected String translateString(String str)
Returns the translation of the native string in the current language.

Overrides:
translateString in class Dictionary

All Packages  Class Hierarchy  This Package  Previous  Next  Index