All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----multilizer.Dictionary
|
+----multilizer.BundleDictionary
|
+----multilizer.FileDictionary
|
+----multilizer.TextDictionary
Set the
DictionaryName
property to contain the name of the resource bundle.
The bundle contains one language file (e.g. "
You can also set the dictionary read data from streams.
Implement the
LanguageStreamListener
and
TranslationStreamListener
interfaces and set them to listen the dictionary by calling the
addLanguageStreamListener
and
addTranslationStreamListener
methods.
The streams must contain the same Unicode data as the text files.
It is a Unicode text file (UCS-2, UTF-16, little-endian 16-bit coded format) where every line contains translations of a string
The format of the row is:
Native<tab> Translation<cr><lf>
Where
Native is the native string.
Use Multilizer Language Manager or any Unicode text editor to create and edit the translation tables.
Translation is the translated string.
<tab> is the Tab character, 0x0009
<cr> is the Carriage return, 0x000D
<lf> is the Line feed, 0x000A
An example:
TextDictionary dictionary = new TextDictionary();
dictionary.setDictionaryName("dictionary");
try
{
dictionary.open();
}
catch (Exception e)
{
}
loadTranslation()
TextDictionary
public TextDictionary()
loadTranslation
protected void loadTranslation() throws Exception
All Packages Class Hierarchy This Package Previous Next Index