org.gudy.azureus2.plugins.utils
Interface LocaleUtilities

All Known Implementing Classes:
LocaleUtilitiesImpl

public interface LocaleUtilities

Author:
parg

Method Summary
 void addListener(LocaleListener l)
           
 Locale getCurrentLocale()
          Returns the current locale being used.
 LocaleDecoder[] getDecoders()
           
 String getLocalisedMessageText(String key)
           
 String getLocalisedMessageText(String key, String[] params)
           
 boolean hasLocalisedMessageText(String key)
          Returns true if there exists a message string with the given key name.
 void integrateLocalisedMessageBundle(Properties p)
          Allows plugins to dynamically pass in a properties object to be used for message text translation.
 void integrateLocalisedMessageBundle(ResourceBundle rb)
          Allows plugins to dynamically pass in a resource bundle to be used for message text translation.
 void integrateLocalisedMessageBundle(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
 String localise(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(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(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(Properties p)
Allows plugins to dynamically pass in a properties object to be used for message text translation.

Since:
3.0.2.3

getLocalisedMessageText

String getLocalisedMessageText(String key)

getLocalisedMessageText

String getLocalisedMessageText(String key,
                               String[] params)

hasLocalisedMessageText

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

Since:
3.0.5.3

localise

String localise(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

Locale getCurrentLocale()
Returns the current locale being used.

Since:
3.0.0.9