@Override
    public Map<String, String> getAllMessages(Locale... locales) {
        Map<String, String> messages = new HashMap<>();
        List<I18nExtension> extensionForLocale;
        for (Locale locale : locales) {
            extensionForLocale = getExtension(locale);
            for (I18nExtension extension : extensionForLocale) {
                merge(messages, extension.map());
            }
        }
        // Now add the messages for the default locale
        extensionForLocale = getExtension(DEFAULT_LOCALE);
        for (I18nExtension extension : extensionForLocale) {
            merge(messages, extension.map());
        }
        return messages;
    }
@ Override public Map < String , String > getAllMessages ( Locale ... locales ) { Map < String , String > messages = new HashMap < > ( ) ; List < I18nExtension > extensionForLocale ; for ( Locale locale : locales ) { extensionForLocale = getExtension ( locale ) ; for ( I18nExtension extension : extensionForLocale ) { merge ( messages , extension . map ( ) ) ; } } extensionForLocale = getExtension ( DEFAULT_LOCALE ) ; for ( I18nExtension extension : extensionForLocale ) { merge ( messages , extension . map ( ) ) ; } return messages ; }
Gets all the messages defined in the given locales AND default locale (for messages not defined in the given
any locale). The message are added to the map only if they are not provided in the previous locale,
meaning that the order is important. The returned map is composed pair of key:message.

@param locales the ordered set of locales
@return the set of defined messages.