ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
Lang.php
Go to the documentation of this file.
1 <?php
2 
9 {
10 
11  public function transform($attr, $config, $context) {
12 
13  $lang = isset($attr['lang']) ? $attr['lang'] : false;
14  $xml_lang = isset($attr['xml:lang']) ? $attr['xml:lang'] : false;
15 
16  if ($lang !== false && $xml_lang === false) {
17  $attr['xml:lang'] = $lang;
18  } elseif ($xml_lang !== false) {
19  $attr['lang'] = $xml_lang;
20  }
21 
22  return $attr;
23 
24  }
25 
26 }
27 
28 // vim: et sw=4 sts=4
Post-transform that copies lang&#39;s value to xml:lang (and vice-versa)
Definition: Lang.php:8
Processes an entire attribute array for corrections needing multiple values.
transform($attr, $config, $context)
Definition: Lang.php:11