Skip to content
Snippets Groups Projects
Commit 3295d96e authored by Olav Morken's avatar Olav Morken
Browse files

SAMLBuilder: Use getLocalizedString.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2025 44740490-163a-0410-bde0-09ae8108e29a
parent 923fbcf4
No related branches found
No related tags found
No related merge requests found
...@@ -330,23 +330,15 @@ class SimpleSAML_Metadata_SAMLBuilder { ...@@ -330,23 +330,15 @@ class SimpleSAML_Metadata_SAMLBuilder {
$attributeconsumer = $this->createElement('AttributeConsumingService'); $attributeconsumer = $this->createElement('AttributeConsumingService');
$attributeconsumer->setAttribute('index', '0'); $attributeconsumer->setAttribute('index', '0');
$name = $metadata->getArrayizeString('name'); $name = $metadata->getLocalizedString('name');
foreach($name AS $lang => $localname) { foreach($name AS $lang => $localname) {
if ($lang === 0) {
/* We use 'en' as the default language. */
$lang = 'en';
}
$t = $this->createTextElement('ServiceName', $localname); $t = $this->createTextElement('ServiceName', $localname);
$t->setAttribute('xml:lang', $lang); $t->setAttribute('xml:lang', $lang);
$attributeconsumer->appendChild($t); $attributeconsumer->appendChild($t);
} }
$description = $metadata->getArrayizeString('description', array()); $description = $metadata->getLocalizedString('description', array());
foreach ($description as $lang => $localname) { foreach ($description as $lang => $localname) {
if ($lang === 0) {
/* We use 'en' as the default language. */
$lang = 'en';
}
$t = $this->createTextElement('ServiceDescription', $localname); $t = $this->createTextElement('ServiceDescription', $localname);
$t->setAttribute('xml:lang', $lang); $t->setAttribute('xml:lang', $lang);
$attributeconsumer->appendChild($t); $attributeconsumer->appendChild($t);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment