UA style sheet for <q>

On Wed, 29 Oct 2008 23:59:33 +0100, Chris Wilson  
<Chris.Wilson@microsoft.com> wrote:

>> D. Firefox makes a token effort to support one non-Enlish language in  
>> one
>> localisation:
>>    <http://lists.w3.org/Archives/Public/public-html/2008Oct/0102.html>
>
> We do better than that.  I'd have to look up precisely how broad it is,  
> but we recognize a set of lang values.

Could you share the style sheet you use? If I understand quoting rules  
correctly, it would have to be something along the lines of

    @namespace url(http://www.w3.org/1999/xhtml);

    q::before { content:open-quote }
    q::after { content:close-quote }

    /* Default -- or should this be '“' '”' '‘' '’' instead? */
    q { quotes:'"' '"' "'" "'" }

    /* Swedish, Finnish */
    *|:lang(sv) > q,
    *|:lang(fi) > q { quotes:'”' '”' '’' '’' }

    /* American English, Irish, Portuguese */
    *|:lang(en) > q,
    *|:lang(ga) > q,
    *|:lang(pt) > q { quotes:'“' '”' '‘' '’' }

    /* British */
    *|:lang(en-GB) > q { quotes:'‘' '’' '“' '”' }

    /* Norwegian */
    *|:lang(no) > q { quotes:'«' '»' '‘' '’' }

    /* French */
    *|:lang(fr) > q { quotes:'«\A0' '\A0»' '“' '”' }

    /* etc */


It's *|:lang(...) > q instead of q:lang(...) to handle quotes in different  
languages correctly, although I don't know if it handles nested quotes in  
different languages correctly and it certainly doesn't handle French  
quoting rules correctly, where the end quote and start quote should be  
omitted when split up: http://en.wikipedia.org/wiki/Angle_quotes#French

It also doesn't contain the ISO 639-2 language codes, although I'm not  
sure if it should.

I was thinking of setting up a wiki page somewhere for this so people can  
fix and expand on it, if we decide to go down this road.

Cheers,
-- 
Simon Pieters
Opera Software

Received on Thursday, 30 October 2008 15:49:48 UTC