/** Gets the localized string corresponding to a key, formatted with a set of args. */ public String getLocalizedString(String key, Object... args) { return getLocalizedString(currentLocale, key, args); }
public String toString() { return messages.getLocalizedString("compiler.misc.unnamed.package"); } };
/** * Converts a String into a locale-dependent representation accordingly to a given locale. * * @param l locale object to be used for i18n * @param key locale-independent key used for looking up in a resource file * @param args localization arguments * @return a locale-dependent string */ protected String localize(Locale l, String key, Object... args) { return messages.getLocalizedString(l, key, args); }
/** * get and format message string from resource * * @param key selects message from resource * @param args arguments for the message */ String getText(String key, Object... args) { return messages.getLocalizedString(locale, key, args); }
/** * Converts a String into a locale-dependent representation accordingly to a given locale. * * @param l locale object to be used for i18n * @param key locale-independent key used for looking up in a resource file * @param args localization arguments * @return a locale-dependent string */ protected String localize(Locale l, String key, Object... args) { return messages.getLocalizedString(l, key, args); }
/** Gets the localized string corresponding to a key, formatted with a set of args. */ public String getLocalizedString(String key, Object... args) { return getLocalizedString(currentLocale, key, args); }
@Override protected String localize(Locale locale, String key, Object... args) { return messages.getLocalizedString(locale, key, args); } @Override
public String toString() { return messages.getLocalizedString("compiler.misc.unnamed.package"); } };
/** * Gets a localized string from the compiler's default bundle. */ // used to support legacy Log.getLocalizedString static String getDefaultLocalizedString(String key, Object... args) { return getLocalizedString(List.of(getDefaultBundle()), key, args); }
/** Find a localized string in the resource bundle. * @param key The key for the localized string. * @param args Fields to substitute into the string. */ public String localize(PrefixKind pk, String key, Object... args) { if (useRawMessages) return pk.key(key); else return messages.getLocalizedString(pk.key(key), args); } // where
public String getLocalizedString(Locale l, String key, Object... args) { if (l == null) l = getCurrentLocale(); return getLocalizedString(getBundles(l), key, args); }
/** * Gets a localized string from the compiler's default bundle. */ // used to support legacy Log.getLocalizedString static String getDefaultLocalizedString(String key, Object... args) { return getLocalizedString(List.of(getDefaultBundle()), key, args); }
/** Find a localized string in the resource bundle. * @param key The key for the localized string. * @param args Fields to substitute into the string. */ public String localize(PrefixKind pk, String key, Object... args) { if (useRawMessages) return pk.key(key); else return messages.getLocalizedString(pk.key(key), args); } // where
public String getLocalizedString(Locale l, String key, Object... args) { if (l == null) l = getCurrentLocale(); return getLocalizedString(getBundles(l), key, args); }