[thelist] [xhtml11] lang attribute

Simon Willison cs1spw at bath.ac.uk
Wed Oct 8 18:18:02 CDT 2003

Decapode Azur wrote:

>>>(in <html> is not appropriate to make one page with several languages
>>>in it)
>>Why not?
> because several languages, but just one attribute possible in this tag
> right:
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
> wrong:
> <html xmlns="http://www.w3.org/1999/xhtml"
> 	xml:lang="en"
> 	xml:lang="fr"
> 	xml:lang="de">

As far as I know you can have multiple languages on one page - you just 
have to mark up each section with its own xml:lang attribute. For example:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

... document mostly in English ...

<div xml:lang="de">
section of the document in German


<blockquote xml:lang="fr">
<p>Quotation in French</p>

Hope that helps,

Simon Willison

More information about the thelist mailing list