Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.
Web technologies are widely used and supported by UAs. HTML and CSS in particular is used for creating web pages and web applications which connect people. Accessibility improved over time and web technologies are designed for the needs and preferences of the user.
A major issue remains - the linguistic accessibility of web technologies. While web content can be translated to address the linguistic needs of users, the default and only language of markup for description languages is English. This specification aims to address this issue for CSS. Using the mechanisms defined in this specification, all properties and keywords are written in and translated to the language of the content creator.
The support for different languages strengthens the decentralization and localization of the web.
This specification interacts with all CSS specification published as Working Draft, Candidate Recommendation and Recommendation of that past and every following specification.
This is a public copy of the early draft. It is provided for discussion only and may change at any moment. Its publication here does not imply endorsement of its contents by W3C. Don't cite this document other than as early draft.
The (archived) public mailing list www-style@w3.org (see instructions) is preferred for discussion of this specification. When sending e-mail, please put the text “css5-localization” in the subject, preferably like this: “[css5-localization] …summary of comment…”
CSS properties and keywords must be available in the language of the content creator. To support global localization, UAs must not require other languages for properties and keywords than defined by the language of the content creator.
To select the language of the web author, this specification defines a
new ‘@
’ (at) rule ‘⚐
’, so called "white flag" (U+2690), followed by the
localized name of the web authors' language. Every style sheet definition
must specify the authors' language. If the language is not defined, the UA
must choose a default.
@⚐ français;
<div style="@⚐ 日本語;"/>
Referring to the @⚐ verbally should be localized for the particular
conversation. So it might be referred to with the English "At Flag" or
the French "Au Drapeau". To ensure that this is not confused with an
‘@flag
’ or ‘@drapeau
’ rule, the speaker MUST raise their left hand
to shoulder level and wave it like a flag when using their localized
vocalization. Contrary to existing case insensitive rules in CSS, it is
not acceptable to raise the right hand instead.
CSS must support all national languages, intergalactic languages as well as popular science-fiction dialects.
@⚐ tlhIngan;
while the language name below chooses "old Klingon", a dialect of the Klingon language.
@⚐ no' Hol;
color:
grey;
’ or ‘color: lightgrey;
’
@⚐ American English;
while the language name below chooses British English, allowing
declarations such as ‘colour:grey;
’ but
invalidating ‘colour:gray;
’
@⚐ British English;
UAs must not support property names and keywords that are not accepted
by the local language of the content creator, chosen by the ‘@⚐
’ rule.
An example of a style-sheet definition in French. The example includes content in English, which must not be accepted. All of the declarations in the second rule are invalid due to the @⚐ rule, and the second rule would not apply to the body element.
@⚐ français;
corps {
fond: rouge;
bord: solide noir 1px;
taille-de-la-police: énorme;
}
body {
background: red;
border: solid black 1px;
font-size: 25px;
}
Some legacy CSS keywords may not have a translation in a particular language. For instance, Klingon cannot translate the color keyword "PeachPuff". Therefore in Klingon you would have to use dss(255,218,185) to express that color (dss being the translation of rgb in Klingon). In the future, all new CSS terms will have to pass a universal translation test before the spec that defines them can leave CR.
Property | Values | Initial | Applies to | Inh. | Percentages | Media |
---|