diff --git a/lib/SimpleSAML/Metadata/SAMLBuilder.php b/lib/SimpleSAML/Metadata/SAMLBuilder.php index f890d9f7247c1f9cf5a3efe05f10afcf310acb8d..5a274e6b6d501a31f3263619d2f62ccaf8c3f231 100644 --- a/lib/SimpleSAML/Metadata/SAMLBuilder.php +++ b/lib/SimpleSAML/Metadata/SAMLBuilder.php @@ -330,23 +330,15 @@ class SimpleSAML_Metadata_SAMLBuilder { $attributeconsumer = $this->createElement('AttributeConsumingService'); $attributeconsumer->setAttribute('index', '0'); - $name = $metadata->getArrayizeString('name'); + $name = $metadata->getLocalizedString('name'); foreach($name AS $lang => $localname) { - if ($lang === 0) { - /* We use 'en' as the default language. */ - $lang = 'en'; - } $t = $this->createTextElement('ServiceName', $localname); $t->setAttribute('xml:lang', $lang); $attributeconsumer->appendChild($t); } - $description = $metadata->getArrayizeString('description', array()); + $description = $metadata->getLocalizedString('description', array()); foreach ($description as $lang => $localname) { - if ($lang === 0) { - /* We use 'en' as the default language. */ - $lang = 'en'; - } $t = $this->createTextElement('ServiceDescription', $localname); $t->setAttribute('xml:lang', $lang); $attributeconsumer->appendChild($t);