ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
Lang.php
Go to the documentation of this file.
1<?php
2
9{
10
17 public function transform($attr, $config, $context)
18 {
19 $lang = isset($attr['lang']) ? $attr['lang'] : false;
20 $xml_lang = isset($attr['xml:lang']) ? $attr['xml:lang'] : false;
21
22 if ($lang !== false && $xml_lang === false) {
23 $attr['xml:lang'] = $lang;
24 } elseif ($xml_lang !== false) {
25 $attr['lang'] = $xml_lang;
26 }
27 return $attr;
28 }
29}
30
31// vim: et sw=4 sts=4
Post-transform that copies lang's value to xml:lang (and vice-versa)
Definition: Lang.php:9
transform($attr, $config, $context)
Definition: Lang.php:17
Processes an entire attribute array for corrections needing multiple values.