[Typo3-dev] Adding language info to the html tag: config.lang

Martin T. Kutschker Martin.T.Kutschker at blackbox.net
Sun Apr 11 04:44:07 CEST 2004


Hello!

To follow the accessability guidelines you should add language info to 
your page. The best place for this is the html tag as it also covers the 
head section.

Following my suggestion for adding bidi info I expand my code:

if ($GLOBALS['TSFE']->config['config']['lang']) {
   $htmlParam .=
     ' lang="'.$GLOBALS['TSFE']->config['config']['lang'].'"';

   if ($xhtml11) {
     $htmlParam .=
       ' xml:lang="'.$GLOBALS['TSFE']->config['config']['lang'].'"';
   }
}

The flag $xhtml11 should be set when XHTML 1.1 is in use. The html 
"lang" attribute has been *removed* in favour of the general xml "lang" 
attribute.

Masi





More information about the TYPO3-dev mailing list