All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class multilizer.BundleDictionary

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

public abstract class BundleDictionary
extends Dictionary
A abstract dictionary component that gets translation data from resource bundle files. It is a Unicode text file (UCS-2, UTF-16, little-endian 16-bit coded format) where every line contains data of a language. The data of the first language is stored in the first line, the second language in the next line, etc. The format of the row is:

EnglishName<tab> NativeName<tab> PrimaryId<tab> SubIds<tab> DefaultSubId<tab> FontName<tab> FontSize<tab> Test<tab> PureASCII<tab> ISOLanguage<tab> ISOCountries<tab> ISODefaultCountry<cr><lf>

Where

EnglishName is the name of the language in the native application language.
NativeName is the native language name.
PrimaryId is the primary language id. Not used by Java.
SubIds is an array of sub language ids. Each sub id separated by a colon (,) mark. If this is "", all the subs of primary language are supported. Not used by Java.
DefaultSubId is the default sub language id. Not used by Java.
FontName is the default font name used when the language is active. If this is "" the original font of the form is used. Not used by Java.
FontSize is the default size of the font. If this is 0 the original font sizeis used. Not used by Java.
Options if contains 0x0001 the language id a test language. If contains 0x0002 the language uses only the first 128 ASCII characters. Such kind of language is compatible to every Windows code page. Not used by Java.
Reserved must be 0.
ISOLanguage is the language string according the ISO-639 standard.
ISOCountries is the array of country strings. Each country is separated by the colon (,) mark. ISO-3166 standard is used to code the countries.
ISODefaultCountry is the default country string according the ISO-3166 standard.
<tab> is the Tab character, 0x0009
<cr> is the Carriage return, 0x000D
<lf> is the Line feed, 0x000A

Use Dictionary Editor or any Unicode text editor to create and edit the language table.


See Also:
BinaryDictionary, TextDictionary, ResourceDictionary

Variable Index

 o LANGUAGES_C

Constructor Index

 o BundleDictionary()

Method Index

 o addLanguageStreamListener(LanguageStreamListener)
Adds the specified stream listener to receive language stream aquire events from this dictionary.
 o getDictionaryName()
Gets the base name of the dictionary.
 o getLanguageCount()
Gets the amount of the languages in the dictionary.
 o getLanguageData(int)
Gets the specified language.
 o getLanguageDatas()
Gets the all languages.
 o getLanguageStream()
 o readLanguage(UnicodeStream)
 o removeLanguageStreamListener(LanguageStreamListener)
Removes the stream aquire listener so it no longer receives stream events from this dictionary.
 o setDictionaryName(String)
Sets the base name of the dictionary.

Variables

 o LANGUAGES_C
 public static final String LANGUAGES_C

Constructors

 o BundleDictionary
 public BundleDictionary()

Methods

 o getLanguageStream
 protected UnicodeStream getLanguageStream() throws Exception
 o getLanguageCount
 public int getLanguageCount() throws Exception
Gets the amount of the languages in the dictionary.

Overrides:
getLanguageCount in class Dictionary
 o readLanguage
 protected Language readLanguage(UnicodeStream in) throws Exception
 o getLanguageData
 public Language getLanguageData(int index) throws Exception
Gets the specified language.

Overrides:
getLanguageData in class Dictionary
 o getLanguageDatas
 public Language[] getLanguageDatas() throws Exception
Gets the all languages.

Overrides:
getLanguageDatas in class Dictionary
 o setDictionaryName
 public void setDictionaryName(String value)
Sets the base name of the dictionary.

 o getDictionaryName
 public String getDictionaryName()
Gets the base name of the dictionary.

 o addLanguageStreamListener
 public synchronized void addLanguageStreamListener(LanguageStreamListener l)
Adds the specified stream listener to receive language stream aquire events from this dictionary. There can be only one listener at a time.

Parameters:
l - the text dictionary listener
 o removeLanguageStreamListener
 public synchronized void removeLanguageStreamListener(LanguageStreamListener l)
Removes the stream aquire listener so it no longer receives stream events from this dictionary.


All Packages  Class Hierarchy  This Package  Previous  Next  Index