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
-
LanguageLearner()
-
-
changeSpokenLanguage(String)
- Changes the language currently spoken.
-
forgetLanguage(String)
- Forgets a language.
-
getKeys()
- Returns an Enumeration of the meta-strings.
-
getLanguageLearner()
- Returns this object (included only for compatibility with the LanguageSpeaker
inteface).
-
getSpokenLanguage()
- Returns the language currently spoken.
-
getSpokenLanguages()
- Returns an Enumeration of the spoken languages.
-
getString(String)
- Returns the string associated to the key in the current spoken language.
-
getStrings()
- Returns an Enumeration of the strings in the current spoken language.
-
getStrings(String)
- Returns an Enumeration of the strings in the specified language.
-
learnLanguage(String)
- Defines the current language to be learned.
-
setString(String, String)
- Sets the string associated to the key in the current learned language.
-
setStrings(String[], String[])
- Sets the string associated to the keys in the current learned language.
LanguageLearner
public LanguageLearner()
learnLanguage
public void learnLanguage(String l)
- Defines the current language to be learned.
- Parameters:
- l - the language.
forgetLanguage
public void forgetLanguage(String l)
- Forgets a language.
- Parameters:
- l - the language.
changeSpokenLanguage
public boolean changeSpokenLanguage(String l)
- Changes the language currently spoken.
- Parameters:
- l - the language.
- Returns:
- if the language is supported or not.
getSpokenLanguage
public String getSpokenLanguage()
- Returns the language currently spoken.
- Returns:
- the spoken language.
getSpokenLanguages
public Enumeration getSpokenLanguages()
- Returns an Enumeration of the spoken languages.
- Returns:
- the spoken languages.
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.
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.
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.
getKeys
public Enumeration getKeys()
- Returns an Enumeration of the meta-strings.
- Returns:
- the meta-strings.
getStrings
public Enumeration getStrings()
- Returns an Enumeration of the strings in the current spoken language.
- Returns:
- the language strings.
getStrings
public Enumeration getStrings(String lang)
- Returns an Enumeration of the strings in the specified language.
- Returns:
- the language strings.
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