Kafenio.editor 0.8.5

de.xeinfach.kafenio.util
Class Translatrix

java.lang.Object
  extended byde.xeinfach.kafenio.util.Translatrix

public final class Translatrix
extends java.lang.Object

Description: This class translates string-ids into language specific messages.

Author:
Howard Kistler, Karsten Pawlik

Constructor Summary
Translatrix()
          private constructor for utility classes
Translatrix(java.lang.String newBundleName)
          private constructor for utility classes
 
Method Summary
 java.util.Locale getLocale()
           
 java.lang.String getTranslationString(java.lang.String originalText)
          returns the translated string for the given originalText
 void setBundleName(java.lang.String bundle)
          sets the resourcebundle name for this class and tries to load it.
 void setLocale(java.util.Locale newLocale)
          sets the current locale, loads the default language file if locale-version could not be found.
 void setLocale(java.lang.String language, java.lang.String country)
          sets the locale using language and country information provided as string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Translatrix

public Translatrix()
private constructor for utility classes


Translatrix

public Translatrix(java.lang.String newBundleName)
private constructor for utility classes

Parameters:
newBundleName - name of the resourcebundle to use
Method Detail

setBundleName

public void setBundleName(java.lang.String bundle)
sets the resourcebundle name for this class and tries to load it.

Parameters:
bundle - name of the resourcebundle to load.

setLocale

public void setLocale(java.util.Locale newLocale)
sets the current locale, loads the default language file if locale-version could not be found.

Parameters:
newLocale - locale string.

getLocale

public java.util.Locale getLocale()
Returns:
returns the currently set locale for this object.

setLocale

public void setLocale(java.lang.String language,
                      java.lang.String country)
sets the locale using language and country information provided as string.

Parameters:
language - language as string
country - country-code as string

getTranslationString

public java.lang.String getTranslationString(java.lang.String originalText)
returns the translated string for the given originalText

Parameters:
originalText - the property name to return the translated string for.
Returns:
returns a string containing the language-specific value for the given property name.

Kafenio.editor 0.8.5

Copyright © 2003-2004 by Karsten Pawlik. All Rights Reserved. Published under the Lesser General Public License (LGPL)