global $wgDocType, $wgDTD, $wgContLanguageCode, $wgOutputEncoding, $wgMimeType;
global $wgUser, $wgContLang, $wgRequest;
- $xml = ($wgMimeType == 'text/xml');
+ $xml = ($wgMimeType == 'text/xml' || $wgMimeType == 'application/xhtml+xml' || $wgMimeType == 'application/xml');
if( $xml ) {
$ret = "<" . "?xml version=\"1.0\" encoding=\"$wgOutputEncoding\" ?" . ">\n";
} else {
$this->mHTMLtitle = wfMsg( "pagetitle", $this->mPagetitle );
}
if( $xml ) {
- $xmlbits = "xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\"";
+ $xmlbits = "xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"$wgContLanguageCode\"";
} else {
$xmlbits = '';
}