diff --git a/templates/default/selectidp-dropdown.php b/templates/default/selectidp-dropdown.php index ff27869b6f58e8cf33ab57112c99fdb1ea19a8f0..930e175fc79318ef46fd9ca862365340a12f9064 100644 --- a/templates/default/selectidp-dropdown.php +++ b/templates/default/selectidp-dropdown.php @@ -7,6 +7,14 @@ $this->data['header'] = $this->t($this->data['header']); $this->includeAtTemplateBase('includes/header.php'); +foreach ($this->data['idplist'] AS $idpentry) { + if (isset($idpentry['name'])) + $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']); + if (isset($idpentry['description'])) + $this->includeInlineTranslation('idpdesc_' . $idpentry['entityid'], $idpentry['description']); +} + + ?> <div id="content"> @@ -28,7 +36,7 @@ $this->includeAtTemplateBase('includes/header.php'); $idpentry['entityid'] == $this->data['preferredidp']) echo ' selected="selected"'; - echo '>'.htmlspecialchars($idpentry['name']).'</option>'; + echo '>'.htmlspecialchars($this->t('idpname_' . $idpentry['entityid'])).'</option>'; } ?> diff --git a/templates/default/selectidp-links.php b/templates/default/selectidp-links.php index c0a5a0ed7d0e541e299ce0c89de8229c430ab54d..1cbaa18427542d8ff2b91e9fe47249977284367f 100644 --- a/templates/default/selectidp-links.php +++ b/templates/default/selectidp-links.php @@ -7,6 +7,14 @@ $this->data['header'] = $this->t($this->data['header']); $this->includeAtTemplateBase('includes/header.php'); +foreach ($this->data['idplist'] AS $idpentry) { + if (isset($idpentry['name'])) + $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']); + if (isset($idpentry['description'])) + $this->includeInlineTranslation('idpdesc_' . $idpentry['entityid'], $idpentry['description']); +} + + ?> <div id="content"> @@ -28,9 +36,9 @@ $this->includeAtTemplateBase('includes/header.php'); $iconUrl = SimpleSAML_Utilities::resolveURL($idpentry['icon']); echo '<img style="display: inline" src="' . htmlspecialchars($iconUrl) . '" />'; } - echo htmlspecialchars($idpentry['name']) . '</h3>'; + echo htmlspecialchars($this->t('idpname_' . $idpentry['entityid'])) . '</h3>'; - echo ' <p>' . htmlspecialchars($idpentry['description']) . '<br />'; + echo ' <p>' . htmlspecialchars($this->t('idpdesc_' . $idpentry['entityid'])) . '<br />'; echo ' [ <a href="' . $this->data['urlpattern'] . htmlspecialchars($idpentry['entityid']) . '">Select this IdP</a>]</p>'; echo '</div>'; } @@ -43,9 +51,9 @@ $this->includeAtTemplateBase('includes/header.php'); $iconUrl = SimpleSAML_Utilities::resolveURL($idpentry['icon']); echo '<img style="display: inline" src="' . htmlspecialchars($iconUrl) . '" />'; } - echo htmlspecialchars($idpentry['name']) . '</h3>'; + echo htmlspecialchars($this->t('idpname_' . $idpentry['entityid'])) . '</h3>'; - echo '<p>' . htmlspecialchars($idpentry['description']) . '<br />'; + echo ' <p>' . htmlspecialchars($this->t('idpdesc_' . $idpentry['entityid'])) . '<br />'; echo '[ <a href="' . $this->data['urlpattern'] . htmlspecialchars($idpentry['entityid']) . '">Select this IdP</a>]</p>'; } }