Use of lang= and xml:lang= attributes is awkward

Bug #244572 reported by Matthew Paul Thomas
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

Launchpad Answers question pages use the lang= HTML attribute, and the xml:lang= attribute, to indicate the language of the question. This is done for the <html> element, and then overridden for all the parts of the page that *aren't* the question, resulting in a lot of lang= attributes for every page in Launchpad:

* <html xml:lang="ar" lang="ar">
    * <title>Ubuntu question #36483: “ماهي طريقة تنصيب الاوبنتو من الصفر؟”</title>
    * <div id="globalheader" xml:lang="en" lang="en">
    * <div id="locationbar" xml:lang="en" lang="en">
    * <div id="structuralobject" xml:lang="en" lang="en">
    * <form id="globalsearch" xml:lang="en" lang="en">
    * <ul id="applicationchooser" xml:lang="en" lang="en">
    * <div id="container">
        * <div id="maincontent">
            * <div xml:lang="en" lang="en">question metadata</div>
            * <h1>ماهي طريقة تنصيب الاوبنتو من الصفر؟</h1>
            * (question and discussion)
            * <div xml:lang="en" lang="en">To post...</div>
            * <div id="ask-your-own-question" xml:lang="en" lang="en">
            * <div id="porlets" xml:lang="en" lang="en">
    * <div id="globalfooter" xml:lang="en" lang="en">
    * <div id="help-pane">

It would be simpler if we specified that the <body> was in English, and then overrode that for the question and discussion:

* <html xml:lang="ar" lang="ar">
    * <body xml:lang="en" lang="en">
        * <h1 xml:lang="ar" lang="ar">ماهي طريقة تنصيب الاوبنتو من الصفر؟</h1>
        * <div xml:lang="ar" lang="ar">question and discussion</div>

Tags: lp-answers
Curtis Hovey (sinzui)
Changed in launchpad-answers:
importance: Undecided → Low
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.