W3C

CSS Localization Module Level 1

Editor's Draft 1 April 2013

This version:
http://www.w3.org/TR/2013/ED-cssN-FIXME-20130401/
Latest version:
http://www.w3.org/TR/cssN-FIXME/
Editor's draft:
http://dev.w3.org/csswg/cssN-FIXME/
Previous version:
http://www.w3.org/PreviousVersionURI
Issue Tracking:
http://www.w3.org/Style/CSS/Tracker/products/FIXME
Feedback:
www-style@w3.org with subject line “[cssN-FIXME] … message topic …
Editors:
, Adobe Systems,
, Adobe Systems,
, Adobe Systems,

Abstract

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.

1. Module Interactions

This specification interacts with all CSS specification published as Working Draft, Candidate Recommendation and Recommendation of that past and every following specification.

Status of this document

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…

2. Language support

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.

2.1. Language selection

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.

The following language defintion chooses French.
  
@⚐ français;
  
Inline styles need to specify the language before style definitions as well:
  
<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.

2.2. Supported languages

CSS must support all national languages, intergalactic languages as well as popular science-fiction dialects.

The following language name chooses Klingon,
  
@⚐ tlhIngan;
  

while the language name below chooses "old Klingon", a dialect of the Klingon language.

  
@⚐ no' Hol;
  

The following language name chooses American English, which will invalidate declarations such as ‘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;
  

3. Localization of property names and keywords

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.

References

Normative references

Other references

Index

Property index

Property Values Initial Applies to Inh. Percentages Media