Re: [css3-fonts] Styling per language

On 05/06/2011 01:09 PM, Me wrote:
> With the popularisation of the goal to get web content that can exist universally, on all browsers, devices, and countries without writing an entire new site per each, I realised if it was possible or if the idea had been brought up to customise styling based on language?
>
> For example, text-aligned right if Hebrew or Arabic, bold for Chinese (Simplified), or a white colour if Spain-Spanish?
>
> The above were hypothetical ideas and in regards to the syntax, I am debating on what it could / would be because the CSS will not detect the language and convert the text, but would only check if a particular language is being used and style accordingly and if one can not be detected, then it defaults to english?.
>
> Do you guys have any ideas, comments, or suggestions?

I believe this was addressed in 1998.
   http://www.w3.org/TR/1998/REC-CSS2-19980512/selector.html#lang

See also
   http://www.w3.org/TR/CSS21/selector.html#lang
   http://www.w3.org/TR/css3-selectors/#lang-pseudo

As for text alignment for rtl languages, it is handled automatically
if you specify the HTML 'dir' attribute like you're supposed to. See
existing documentation:
   http://www.w3.org/International/tutorials/bidi-xhtml/
   http://www.w3.org/TR/i18n-html-tech-bidi/
   http://www.w3.org/TR/html40/struct/dirlang.html#h-8.2

~fantasai

Received on Friday, 6 May 2011 21:00:24 UTC