org.gudy.azureus2.pluginsimpl.local.utils
Class LocaleUtilitiesImpl

java.lang.Object
  extended by org.gudy.azureus2.pluginsimpl.local.utils.LocaleUtilitiesImpl
All Implemented Interfaces:
LocaleUtilities

public class LocaleUtilitiesImpl
extends java.lang.Object
implements LocaleUtilities


Constructor Summary
LocaleUtilitiesImpl(PluginInterface _pi)
           
 
Method Summary
 void addListener(LocaleListener l)
           
 java.util.Locale getCurrentLocale()
          Returns the current locale being used.
 LocaleDecoder[] getDecoders()
           
 java.lang.String getLocalisedMessageText(java.lang.String key)
           
 java.lang.String getLocalisedMessageText(java.lang.String key, java.lang.String[] params)
           
 boolean hasLocalisedMessageText(java.lang.String key)
          Returns true if there exists a message string with the given key name.
 void integrateLocalisedMessageBundle(java.util.Properties p)
          Allows plugins to dynamically pass in a properties object to be used for message text translation.
 void integrateLocalisedMessageBundle(java.util.ResourceBundle rb)
          Allows plugins to dynamically pass in a resource bundle to be used for message text translation.
 void integrateLocalisedMessageBundle(java.lang.String resource_bundle_prefix)
          Allows programatic registration of plugin messages, as opposed to using the plugin.langfile property in plugin.properties If you message base file is, say, a.b.c.Messages.properties, pass a.b.c.Messages
 java.lang.String localise(java.lang.String key)
          An alias for LocaleUtilities.getLocalisedMessageText(String) which returns null if there is no message string definition for the given key.
 void removeListener(LocaleListener l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocaleUtilitiesImpl

public LocaleUtilitiesImpl(PluginInterface _pi)
Method Detail

integrateLocalisedMessageBundle

public void integrateLocalisedMessageBundle(java.lang.String resource_bundle_prefix)
Description copied from interface: LocaleUtilities
Allows programatic registration of plugin messages, as opposed to using the plugin.langfile property in plugin.properties If you message base file is, say, a.b.c.Messages.properties, pass a.b.c.Messages

Specified by:
integrateLocalisedMessageBundle in interface LocaleUtilities

integrateLocalisedMessageBundle

public void integrateLocalisedMessageBundle(java.util.ResourceBundle rb)
Description copied from interface: LocaleUtilities
Allows plugins to dynamically pass in a resource bundle to be used for message text translation.

Specified by:
integrateLocalisedMessageBundle in interface LocaleUtilities

integrateLocalisedMessageBundle

public void integrateLocalisedMessageBundle(java.util.Properties p)
Description copied from interface: LocaleUtilities
Allows plugins to dynamically pass in a properties object to be used for message text translation.

Specified by:
integrateLocalisedMessageBundle in interface LocaleUtilities

getLocalisedMessageText

public java.lang.String getLocalisedMessageText(java.lang.String key)
Specified by:
getLocalisedMessageText in interface LocaleUtilities

getLocalisedMessageText

public java.lang.String getLocalisedMessageText(java.lang.String key,
                                                java.lang.String[] params)
Specified by:
getLocalisedMessageText in interface LocaleUtilities

hasLocalisedMessageText

public boolean hasLocalisedMessageText(java.lang.String key)
Description copied from interface: LocaleUtilities
Returns true if there exists a message string with the given key name.

Specified by:
hasLocalisedMessageText in interface LocaleUtilities

localise

public java.lang.String localise(java.lang.String key)
Description copied from interface: LocaleUtilities
An alias for LocaleUtilities.getLocalisedMessageText(String) which returns null if there is no message string definition for the given key.

Specified by:
localise in interface LocaleUtilities

getCurrentLocale

public java.util.Locale getCurrentLocale()
Description copied from interface: LocaleUtilities
Returns the current locale being used.

Specified by:
getCurrentLocale in interface LocaleUtilities

getDecoders

public LocaleDecoder[] getDecoders()
Specified by:
getDecoders in interface LocaleUtilities

addListener

public void addListener(LocaleListener l)
Specified by:
addListener in interface LocaleUtilities

removeListener

public void removeListener(LocaleListener l)
Specified by:
removeListener in interface LocaleUtilities