All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tea.util.local.LanguageLearner

java.lang.Object
   |
   +----tea.util.local.LanguageLearner

public class LanguageLearner
extends Object
implements LanguageSpeaker

A LanguageLearner is a LanguageSpeaker that can learn new languages.

Version:
1.0 beta - 31 May 1997
Author:
Leonardo Boselli
See Also:
LanguageManager

Constructor Index

 o LanguageLearner()

Method Index

 o changeSpokenLanguage(String)
Changes the language currently spoken.
 o forgetLanguage(String)
Forgets a language.
 o getKeys()
Returns an Enumeration of the meta-strings.
 o getLanguageLearner()
Returns this object (included only for compatibility with the LanguageSpeaker inteface).
 o getSpokenLanguage()
Returns the language currently spoken.
 o getSpokenLanguages()
Returns an Enumeration of the spoken languages.
 o getString(String)
Returns the string associated to the key in the current spoken language.
 o getStrings()
Returns an Enumeration of the strings in the current spoken language.
 o getStrings(String)
Returns an Enumeration of the strings in the specified language.
 o learnLanguage(String)
Defines the current language to be learned.
 o setString(String, String)
Sets the string associated to the key in the current learned language.
 o setStrings(String[], String[])
Sets the string associated to the keys in the current learned language.

Constructors

 o LanguageLearner
 public LanguageLearner()

Methods

 o learnLanguage
 public void learnLanguage(String l)
Defines the current language to be learned.

Parameters:
l - the language.
 o forgetLanguage
 public void forgetLanguage(String l)
Forgets a language.

Parameters:
l - the language.
 o changeSpokenLanguage
 public boolean changeSpokenLanguage(String l)
Changes the language currently spoken.

Parameters:
l - the language.
Returns:
if the language is supported or not.
 o getSpokenLanguage
 public String getSpokenLanguage()
Returns the language currently spoken.

Returns:
the spoken language.
 o getSpokenLanguages
 public Enumeration getSpokenLanguages()
Returns an Enumeration of the spoken languages.

Returns:
the spoken languages.
 o setString
 public void setString(String key,
                       String s)
Sets the string associated to the key in the current learned language.

Parameters:
key - the meta-string.
s - the corresponding string in the current learned language.
 o setStrings
 public void setStrings(String keys[],
                        String s[]) throws ArrayIndexOutOfBoundsException
Sets the string associated to the keys in the current learned language.

Parameters:
keys - the meta-string array.
s - the corresponding string array in the current learned language.
 o getString
 public String getString(String key)
Returns the string associated to the key in the current spoken language.

Parameters:
key - the meta-string.
Returns:
the corresponding string.
 o getKeys
 public Enumeration getKeys()
Returns an Enumeration of the meta-strings.

Returns:
the meta-strings.
 o getStrings
 public Enumeration getStrings()
Returns an Enumeration of the strings in the current spoken language.

Returns:
the language strings.
 o getStrings
 public Enumeration getStrings(String lang)
Returns an Enumeration of the strings in the specified language.

Returns:
the language strings.
 o getLanguageLearner
 public LanguageLearner getLanguageLearner()
Returns this object (included only for compatibility with the LanguageSpeaker inteface).

Returns:
the LanguageLearner (this).

All Packages  Class Hierarchy  This Package  Previous  Next  Index