zisko.multicastor.program.lang
Class LanguageManager

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by zisko.multicastor.program.lang.LanguageManager
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>

public class LanguageManager
extends java.util.Properties

This class supports the LanguageFile management of the MultiCastor It is created as a singleton. That means that there can be only one object of this class at runtime

See Also:
"http://en.wikipedia.org/wiki/Singleton_pattern", "http://de.wikipedia.org/wiki/Singleton_(Entwurfsmuster)", Serialized Form

Field Summary
static java.lang.String[] languages
          Array stores all languages detected as language file in the language directory
 
Method Summary
static java.lang.String getCurrentLanguage()
          Method returns the name of the current selected language
static LanguageManager getInstance()
          Method returns the one and only LanguageManager object.
static void setCurrentLanguage(java.lang.String currentLanguage)
          Set the current language of the program.
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

languages

public static final java.lang.String[] languages
Array stores all languages detected as language file in the language directory

Method Detail

getInstance

public static LanguageManager getInstance()
Method returns the one and only LanguageManager object. If there isn't any object it will be created by calling the constructor without any parameters.

Returns:
the one and only LanguageManager object

setCurrentLanguage

public static void setCurrentLanguage(java.lang.String currentLanguage)
Set the current language of the program. The given language name must be the same name as the language file name. The file have to be placed at 'Language/GIVENLANGUAGE.lang'.

Parameters:
currentLanguage - name of the language that you want to load

getCurrentLanguage

public static java.lang.String getCurrentLanguage()
Method returns the name of the current selected language

Returns:
name of the current selected language