Class MessageText
java.lang.Object
com.biglybt.core.internat.MessageText
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int(package private) static final Stringprivate static IntegratedResourceBundlestatic final Stringprivate static final Listprivate static Localestatic final Localestatic final Localeprivate static final booleanprivate static final Patternprivate static Setprivate static final Stringprivate static final Mapprivate static final Collection(package private) static IntegratedResourceBundle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidaddListener(MessageText.MessageTextListener listener) static booleanchangeLocale(Locale newLocale) private static booleanchangeLocale(Locale newLocale, boolean force) static StringexpandValue(String value) static Localestatic Stringstatic Localestatic Locale[]getLocales(boolean sort) static Stringstatic StringgetPlatformNeutralString(String key, String sDefault) (package private) static ResourceBundlegetResourceBundle(String name, Locale loc, ClassLoader cl) private static Stringstatic Stringstatic Stringstatic StringExpands a message text and replaces occurrences of %1 with first param, %2 with second...static StringSuppliergetStringProvider(String key, String... params) Supplier of localized string for given key.private static Stringstatic booleanintegratePluginMessages(String localizationPath, ClassLoader classLoader) static booleanstatic booleanisCurrentLocale(Locale locale) static booleanstatic booleanstatic voidstatic voidloadBundle(boolean forceReload) (package private) static LocaleparseFormattedLocaleString(String savedLocaleString) static voidprotected static StringreplaceStrings(String str, String f_s, String t_s) private static voidstatic voidSets keys for system wide constants
-
Field Details
-
LOCALE_ENGLISH
-
LOCALE_DEFAULT
-
LOG_MISSING_MESSAGES
private static final boolean LOG_MISSING_MESSAGES -
LOCALE_CURRENT
-
BUNDLE_NAME
-
CONSTANTS
-
DEFAULT_BUNDLE_NAME
- See Also:
-
pluginLocalizationPaths
-
pluginResourceBundles
-
RESOURCE_BUNDLE
-
platform_specific_keys
-
PAT_PARAM_ALPHA
-
bundle_fail_count
private static int bundle_fail_count -
listeners
-
PLATFORM_SUFFIX
-
DEFAULT_BUNDLE
-
substitutes
-
-
Constructor Details
-
MessageText
public MessageText()
-
-
Method Details
-
updateProductName
public static void updateProductName()Sets keys for system wide constants -
loadBundle
public static void loadBundle() -
loadBundle
public static void loadBundle(boolean forceReload) -
addListener
-
addAndFireListener
-
removeListener
-
getResourceBundle
-
setResourceBundle
-
keyExists
-
keyExistsForDefaultLocale
-
getString
-
getString
-
getPlatformNeutralString
-
getPlatformNeutralString
-
getResourceBundleString
-
expandValue
-
getUISuffix
-
getString
-
replaceStrings
-
getDefaultLocaleString
-
getCurrentLocale
-
isCurrentLocale
-
getLocales
-
changeLocale
-
changeLocale
-
integratePluginMessages
-
integratePluginMessages
-
getDisplaySubstitute
-
parseFormattedLocaleString
- Returns:
- matching Locale or
Locale.ROOTif unrecognized format or imparsable.
-
getStringProvider
Supplier of localized string for given key. The string construction is lazy evaluated.
-