/** * Returns resources in the locale specified in the given property map. This convenience method looks * for the {@link #LOCALE_KEY} entry. If the given map is null, or contains no entry for the locale key, * or the value is not an instance of {@link Locale}, then this method fallback on the default locale. * * @param properties the map of properties, or {@code null} if none. * @return resources in the given locale. * @throws MissingResourceException if resources can't be found. */ public static Resources forProperties(final Map<?,?> properties) throws MissingResourceException { return forLocale(getLocale(properties)); }
/** * Returns resources in the locale specified in the given property map. This convenience method looks * for the {@link #LOCALE_KEY} entry. If the given map is null, or contains no entry for the locale key, * or the value is not an instance of {@link Locale}, then this method fallback on the default locale. * * @param properties the map of properties, or {@code null} if none. * @return resources in the given locale. * @throws MissingResourceException if resources can't be found. */ public static Resources forProperties(final Map<?,?> properties) throws MissingResourceException { return forLocale(getLocale(properties)); }