Skip to content
Snippets Groups Projects
Commit eb6b12e2 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Added support for translating attribute names to different languages.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@323 44740490-163a-0410-bde0-09ae8108e29a
parent 85e79faf
No related branches found
No related tags found
No related merge requests found
<?php
$lang = array(
'en' => array(
'attribute_mail' => 'E-Mail',
'attribute_edupersonaffiliation' => 'Affiliation',
'attribute_title' => 'Title',
'attribute_uid' => 'User ID',
),
'no' => array(
'attribute_mail' => 'E-post',
'attribute_edupersonaffiliation' => 'Tilhørighet',
'attribute_title' => 'Tittel',
'attribute_uid' => 'BrukerID',
)
);
\ No newline at end of file
......@@ -17,6 +17,11 @@
$attributes = $data['attributes'];
foreach ($attributes AS $name => $value) {
if (isset($this->data['attribute_' . htmlspecialchars($name) ])) {
$name = $this->data['attribute_' . htmlspecialchars($name) ];
}
if (sizeof($value) > 1) {
echo '<tr><td>' . htmlspecialchars($name) . '</td><td><ul>';
foreach ($value AS $v) {
......
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