com.alee.managers.language
Class LanguageUtils

java.lang.Object
  extended by com.alee.managers.language.LanguageUtils

public class LanguageUtils
extends java.lang.Object

This class provides a set of utilities to work with LanguageManager.

Author:
Mikle Garin

Constructor Summary
LanguageUtils()
           
 
Method Summary
static java.util.List<java.lang.String> gatherKeys(Dictionary dictionary)
          Returns all dictionary keys.
static java.lang.String getInitialText(java.lang.String text, java.lang.Object... data)
          Returns proper initial component text.
static void mergeDictionary(Dictionary dictionary, Dictionary mergeInto)
          Merges specified dictionary with the global dictionary.
static void registerInitialLanguage(LanguageMethods component, java.lang.String text, java.lang.Object... data)
          Registers proper initial component language key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageUtils

public LanguageUtils()
Method Detail

getInitialText

public static java.lang.String getInitialText(java.lang.String text,
                                              java.lang.Object... data)
Returns proper initial component text.

Parameters:
text - text provided into component constructor
data - language data, may not be passed
Returns:
proper initial component text

registerInitialLanguage

public static void registerInitialLanguage(LanguageMethods component,
                                           java.lang.String text,
                                           java.lang.Object... data)
Registers proper initial component language key.

Parameters:
component - translated component
text - text provided into component constructor
data - language data, may not be passed

gatherKeys

public static java.util.List<java.lang.String> gatherKeys(Dictionary dictionary)
Returns all dictionary keys. This method returns complete keys for each record, not just record keys.

Parameters:
dictionary - dictionary to gather keys for
Returns:
all dictionary keys

mergeDictionary

public static void mergeDictionary(Dictionary dictionary,
                                   Dictionary mergeInto)
Merges specified dictionary with the global dictionary.

Parameters:
dictionary - dictionary to merge