/** * Wraps the given resource bundle for formatting strings. * * @param bundle the resource bundle to wrap. */ public static FormattedResourceBundle wrap(ResourceBundle bundle) { return new FormattedResourceBundle(requireNonNull(bundle)); }
/** * Returns a formatted resource bundle for the given base name with the * given locale. * * @param baseName the base name of the resource bundle. * @param locale the locale to use for the lookup. */ public static FormattedResourceBundle bundle(String baseName, Locale locale) { return new FormattedResourceBundle(ResourceBundle.getBundle(baseName, locale)); }