org.gudy.azureus2.core3.internat
Class MessageText
java.lang.Object
org.gudy.azureus2.core3.internat.MessageText
public class MessageText
- extends java.lang.Object
- Author:
- Arbeiten, CrazyAlchemist Added keyExistsForDefaultLocale
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCALE_ENGLISH
public static final java.util.Locale LOCALE_ENGLISH
LOCALE_DEFAULT
public static final java.util.Locale LOCALE_DEFAULT
MessageText
public MessageText()
updateProductName
public static void updateProductName()
loadBundle
public static void loadBundle()
loadBundle
public static void loadBundle(boolean forceReload)
addListener
public static void addListener(MessageText.MessageTextListener listener)
addAndFireListener
public static void addAndFireListener(MessageText.MessageTextListener listener)
removeListener
public static void removeListener(MessageText.MessageTextListener listener)
keyExists
public static boolean keyExists(java.lang.String key)
keyExistsForDefaultLocale
public static boolean keyExistsForDefaultLocale(java.lang.String key)
getString
public static java.lang.String getString(java.lang.String key,
java.lang.String sDefault)
- Parameters:
key
-
- Returns:
getString
public static java.lang.String getString(java.lang.String key)
getPlatformNeutralString
public static java.lang.String getPlatformNeutralString(java.lang.String key)
getPlatformNeutralString
public static java.lang.String getPlatformNeutralString(java.lang.String key,
java.lang.String sDefault)
expandValue
public static java.lang.String expandValue(java.lang.String value)
getStringForSentence
public static java.lang.String getStringForSentence(java.lang.String sentence)
- Process a sequence of words, and translate the ones containing at least one '.', unless it's an ending dot.
- Parameters:
sentence
-
- Returns:
- the formated String in the current Locale
getString
public static java.lang.String getString(java.lang.String key,
java.lang.String[] params)
- Expands a message text and replaces occurrences of %1 with first param, %2 with second...
- Parameters:
key
- params
-
- Returns:
replaceStrings
protected static java.lang.String replaceStrings(java.lang.String str,
java.lang.String f_s,
java.lang.String t_s)
getDefaultLocaleString
public static java.lang.String getDefaultLocaleString(java.lang.String key)
getCurrentLocale
public static java.util.Locale getCurrentLocale()
isCurrentLocale
public static boolean isCurrentLocale(java.util.Locale locale)
getLocales
public static java.util.Locale[] getLocales(boolean sort)
changeLocale
public static boolean changeLocale(java.util.Locale newLocale)
integratePluginMessages
public static boolean integratePluginMessages(java.lang.String localizationPath,
java.lang.ClassLoader classLoader)
integratePluginMessages
public static boolean integratePluginMessages(java.util.ResourceBundle bundle)
resolveLocalizationKey
public static java.lang.String resolveLocalizationKey(java.lang.String localizationKey)
- Sometime a localization key has 2 different returned values: one for Classic UI and another for the Vuze UI
This method will attempt to locate the given key (with the prefix v3. ) if applicable, if found
then it will return the key with the prepended prefix. Otherwise it will return the key as given
- Parameters:
localizationKey
-
- Returns:
resolveAcceleratorKey
public static java.lang.String resolveAcceleratorKey(java.lang.String acceleratorKey)
- Sometime a accelerator key has 2 different returned values: one for Classic UI and another for the Vuze UI
This method will attempt to locate the given key (with the prefix v3. ) if applicable, if found
then it will return the key with the prepended prefix. Otherwise it will return the key as given
- Parameters:
acceleratorKey
-
- Returns: