Page is a not externally linkable
alt131 - 1:05 pm on Jun 15, 2012 (gmt 0)
Hi Luce', so far as I am aware it isn't possible to set language using css and Internationalization Best Practices 4.1.6 CSS [w3.org] says the same thing. Makes sense really - language goes to the fundamental stucture of the document not the style, and is really useful for assistive technology that doesn't use css. The common eg being penchant which reads as "pen-chunt" in english, "pon-chont" if properly marked up as french.
So that takes me back to the fat document issue. Can you approach this from the reverse? Do you really need a class plus a language? That is, rather than associating a language with a style, associate the style with the language. Would still take a search and replace, but that would put the lang into the HTML where it is most helpful, connect the style to the function it serves, and reduce mark-up. An eg in case that doesn't make sense:
<p>Sentence using <span class="myclass">german</span> and <span class="myclass2">french</span></p>
.myclass {color:red}
.myclass2 {color:green}
Replace with
<p>Sentence using <span lang="de">german</span> and <span lang="fr">french</span></p>
:lang(de) {color:red}
:lang(fr) {color:green}
Edit reason: Better example