net.sf.sfac.lang
Class LanguageSupportImpl
java.lang.Object
net.sf.sfac.lang.LanguageSupport
net.sf.sfac.lang.LanguageSupportImpl
- All Implemented Interfaces:
- Cloneable
public class LanguageSupportImpl
- extends LanguageSupport
- implements Cloneable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LanguageSupportImpl
public LanguageSupportImpl(String bundleName,
String startLocaleId)
- Construct a LanguageSupportImpl using one bundle and the given locale. Other bundles can be added with the
addResourceBundle method.
- Parameters:
bundleName - name of the (unique) bundle.startLocaleId - id of the locale.
LanguageSupportImpl
public LanguageSupportImpl(String[] allBundleNames,
String startLocaleId)
- Construct a LanguageSupportImpl using several bundle and the given locale.
- Parameters:
allBundleNames - name of the bundles.startLocaleId - id of the locale.
copyInstance
public LanguageSupport copyInstance()
- Specified by:
copyInstance in class LanguageSupport
setTracker
public void setTracker(LocalizedStringTracker newTracker)
- Set a tracker to track string usage in the application.
saveTrackedInfo
public void saveTrackedInfo()
addResourceBundle
public void addResourceBundle(String bundleName)
- Add a resourceBundle to the bundle used by this LanguageSupportImpl. (this will fire a language changed event to all
listeners).
- Parameters:
bundleName - newly defined bundle.
getLocalizedStringImpl
public String getLocalizedStringImpl(String key)
- Specified by:
getLocalizedStringImpl in class LanguageSupport
getLocalizedStringImpl
public String getLocalizedStringImpl(String key,
Object... params)
- Specified by:
getLocalizedStringImpl in class LanguageSupport
getOptionalLocalizedStringImpl
public String getOptionalLocalizedStringImpl(String key,
String defaultValue)
- Specified by:
getOptionalLocalizedStringImpl in class LanguageSupport
updateLanguageImpl
public void updateLanguageImpl(String newLocaleId)
- Specified by:
updateLanguageImpl in class LanguageSupport
loadResources
protected void loadResources(Locale newLocale)
getCurrentLocaleImpl
public Locale getCurrentLocaleImpl()
- Specified by:
getCurrentLocaleImpl in class LanguageSupport
addLanguageListenerImpl
public void addLanguageListenerImpl(LanguageListener lis)
- Specified by:
addLanguageListenerImpl in class LanguageSupport
removeLanguageListenerImpl
public void removeLanguageListenerImpl(LanguageListener lis)
- Specified by:
removeLanguageListenerImpl in class LanguageSupport
Copyright © 2012. All Rights Reserved.