private static String getLocalizedValues(final String locale, final List<?> items) {
        val foundLocale = findLocale(StringUtils.defaultIfBlank(locale, "en"), items);
        if (foundLocale.isPresent()) {
            return foundLocale.get();
        }

        if (!items.isEmpty()) {
            val item = items.getFirst();
            var value = StringUtils.EMPTY;
            if (item instanceof final LocalizedName instance) {
                value = instance.getValue();
            }
            if (item instanceof final LocalizedURI instance) {
                value = instance.getURI();
            }
            if (item instanceof final XSString instance) {
                value = instance.getValue();
            }
            LOGGER.trace("Loading first available locale [{}]", value);
            return value;
        }
        return null;
    }
Gets localized values.

@param locale browser preferred language
@param items  the items
@return the string value
support/cas-server-support-saml-mdui-core/src/main/java/org/apereo/cas/support/saml/mdui/SamlMetadataUIInfo.java