I've been using a i18n.css which makes heavy use of serving language
specific styles using the lang attribute as selector.
While at the moment this is pure css (IE needs some javascript), I
would love to see more use of the lang attribute in more sofisticated
ways.

Just for better understanding, this is an extract from my i18n.css for
serving quotes:
/* display from right to left */
[lang*="ar"],[lang*="fa"],[lang*="he"],[lang*="ur"] {
        unicode-bidi: bidi-override;
        direction: rtl;
}
/* japanese single-quote, blockquote, blockquote inner inner quote */
[lang*="ja"] q::before,blockquote p[lang*="ja"]::before,
blockquote p[lang*="ja"] q q::before {
        content: "\300C";
}
[lang*="ja"] q::after,blockquote p[lang*="ja"]::after,
blockquote p[lang*="ja"] q q::after {
        content: "\300D";
}
/* japanese inner quote, blockquote inner quote */
[lang*="ja"] q q::before,blockquote p[lang*="ja"] q::before {
        content: "\300E";
}
[lang*="ja"] q q::after,blockquote p[lang*="ja"] q::after {
        content: "\300F";
}

You can grab the country-code of your visitor on the server-side (see
here: http://www.maxmind.com/app/api) or
with javascript only by using this service: 
http://www.maxmind.com/app/javascript
The country-code could then be the default lang value.

I hope this offers a little direction.

Reply via email to