org.gudy.azureus2.plugins.utils
Interface LocaleUtilities

All Known Implementing Classes:
LocaleUtilitiesImpl

public interface LocaleUtilities

Author:
parg

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 getLocalisedMessageText(String) which returns null if there is no message string definition for the given key.
 void removeListener(LocaleListener l)
           
 

Method Detail

integrateLocalisedMessageBundle

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

Parameters:
resource_bundle_prefix -

integrateLocalisedMessageBundle

void integrateLocalisedMessageBundle(java.util.ResourceBundle rb)
Allows plugins to dynamically pass in a resource bundle to be used for message text translation.

Since:
3.0.2.3

integrateLocalisedMessageBundle

void integrateLocalisedMessageBundle(java.util.Properties p)
Allows plugins to dynamically pass in a properties object to be used for message text translation.

Since:
3.0.2.3

getLocalisedMessageText

java.lang.String getLocalisedMessageText(java.lang.String key)

getLocalisedMessageText

java.lang.String getLocalisedMessageText(java.lang.String key,
                                         java.lang.String[] params)

hasLocalisedMessageText

boolean hasLocalisedMessageText(java.lang.String key)
Returns true if there exists a message string with the given key name.

Since:
3.0.5.3

localise

java.lang.String localise(java.lang.String key)
An alias for getLocalisedMessageText(String) which returns null if there is no message string definition for the given key.

Since:
3.0.5.3

getDecoders

LocaleDecoder[] getDecoders()

addListener

void addListener(LocaleListener l)

removeListener

void removeListener(LocaleListener l)

getCurrentLocale

java.util.Locale getCurrentLocale()
Returns the current locale being used.

Since:
3.0.0.9