(Languages: be cs da de en es fr hi ja ko pl ru th tl uk vi zh-hans zh-hant)

Web Style Sheets
About the translations /
hints for translators

(This page uses CSS style sheets)

About

Location of pages

Hints for translators

Style hints

Mark-up hints

Encoding hints

Hebrew & Arabic

Attribution

Language negotiation

Validity

About the translations

The translations of the style and CSS pages, like most other translations on the W3C Web site, are done by volunteers. Some translations are of high quality, others less. They are likely to be somewhat out of date with respect to the original, English pages.

If you're looking for translations of technical specifications, the best place to look is the database of translations. Translations of other pages, like this one, which may change from time to time, are generally linked directly from the original English page and don't appear in the database.

If you notice errors in any of the pages, please, let us know.

A big thanks to all the translators!

Hints for translators

If you want to help by translating one or more pages, please let us know by sending e-mail to the archived translators mailing list <w3c-translators@w3.org>.

You don't have to be a professional translator, but we do in general prefer translations into your native language, for better quality. Machine translations are of too low quality, so please don't send us any.

Location of translations

Most of the translations are not hosted on the W3C site. If you have a Web site on which you can place your translation, we will simply make a link. But if you prefer, we can also put the translation on the W3C site itself.

We prefer stable links, so if the location of a translation is likely to change or even disappear completely, it may be better to send us the document, so that we can put it on the W3C site.

Use of style sheets

It is easier for readers if the original and the translation have the same page layout. That means that translations in general use the same style sheets as the original. There are two ways to do that:

  1. Link to the original style sheets on the w3.org site.
  2. Copy the relevant style sheets to your own site.

If you link to the style sheets on the W3C site, you will have to change relative links such as

<link rel=stylesheet title="Gold + navbar"
  href="threepart-f.css"...

into absolute links, such as

<link rel=stylesheet title="Gold + navbar"
  href="http://www.w3.org/Style/threepart-f.css"...

Some of the rules in the style sheet are language-dependent. In particular the words “Local links” that you see at the top of the right column come from the style sheet. So if make a local copy of the style sheets, please insert an appropriate translation of those words into the threepart.css file.

The style rule to insert looks like this:

div.map:lang(en):before {content: "Local links"}

where the “en” has to be replaced by the language code (see next section) of your language and the text is what has to be translated.

If you link to the style sheets on the W3C site, please let me know what the translation of these words to your language is, so that I can add it to the master style sheet.

There may in rare cases be other style rules that have to change for certain languages.

Language mark-up

All text in Web pages should normally be marked up with the name of the language in which it is written. For pages that use the W3C style sheets it is even more important, because some of the style rules are language-dependent.

As a minimum, pages should have a line like this at the top, just after the “doctype” line:

<html lang="xy">

where “xy” must be replaced by the 2-letter language code for your language. If there exists no 2-letter code, please use the 3-letter code instead.

The translated text should in general have the same mark-up (tags) as the original, although it may be necessary to change the mark-up inside sentences, because word order is different between different languages.

Character encoding

The following applies if you plan to put a translated page on your own Web site (as most translators do).

Text may not display correctly if the character encoding of the document isn't indicated properly. The character encoding is the mapping of bytes to letters and if a browser doesn't know the correct encoding, some letters may not show up or be replaced by other letters. Although the user can tell his browser to use a different encoding, it is, of course, better if the browser gets it right the first time. And a document is not valid (see below) without a properly indicated encoding.

Common character encodings are ASCII, ISO-8859-1, UTF-8 and Windows-1252, but there are many more. When you write a document, it will generally be either in the local encoding of your computer or in UTF-8.

There are two ways to let a browser know what the encoding of a document is. The best way is that the Web server tells the browser directly, as soon as the browser asks for a document. If your Web server is configured correctly, it already does that and you don't have to do anything for new documents that you upload.

You can check if your Web server sends the correct character encoding by validating a document on that server with the help of the W3C mark-up validator. It will tell you if the encoding is missing or incorrect.

If your Web server doesn't send the correct encoding and you can't configure it, the alternative is to declare the encoding in the document. You do that by adding a line like this in the HEAD part of the document:

<meta http-equiv="Content-type"
  content="text/html;charset=utf-8">

where the “utf-8” must be replaced by the actual encoding of the document (if it is not utf-8).

For more information about character encodings, see Character encodings in W3C's internationalization pages.

Translating into Hebrew or Arabic

Most translations have the same mark-up as the original and only the content is different, with rare exceptions. But when translating English text into a “bidi” (bi-directional) language such as Hebrew or Arabic, extra mark-up is needed to indicate which text is read from right to left and which from left to right.

The article What you need to know about the bidi algorithm and inline markup by Richard Ishida explains how it works. W3C's guidelines (still work in progress) form section 7 of Best Practices for Authoring HTML: Handling Right-to-left Scripts.

Copyright and attribution

The W3C copyright license allows anybody to make translations, but there are conditions. In brief, you can make a translation as long as you clearly indicate in the translation where the original is and as long as you allow W3C to re-publish that translation. See the IPR FAQ, in particular the sections on translating specifications, translating other documents, and “official” translations.

The link to the original should use the full URL, including the .html at the end. (I.e., not http://www.w3.org/foo, but http://www.w3.org/foo.html.) See the explanation under Language negotiation below.

W3C Special rules apply to the W3C logo. The one thing to remember is to use the original URL in the SRC attribute, like this:

<a href="http://www.w3.org/"><img alt="W3C"
  src="http://www.w3.org/Icons/w3c_home"></a>

Language negotiation

In most cases, the W3C server returns an English document by default and only serves a translated document if the user explicitly asks for one, by clicking on the relevant link. But in some cases (some tutorials, e.g.), things are reversed: the server by default returns a document in the language of the user and only returns English if the user explicitly clicks on the link to the English version.

This process of automatically returning the language that the user prefers is called language negotiation and it is a feature of HTTP. The way it works, at least on this site, is that, in addition to URLs for each individual document, there is one URL that represents all translations. That URL in our case is formed by leaving off the .html extension: if we have an English document http://www.w3.org/foo.html, then the generic URL is http://www.w3.org/foo.

If the user clicks on a link to the generic URL, the server looks at the preferred language of the user (which is passed in the HTTP request) and compares it to the list of available URLs. It then returns the proper document.

Many browsers allow the user to configure his language preferences (you can even have more than one), but the default is the language of the browser itself.

Concretely, that means if you make a link specifically to the English version of a document, you should include the .html at the end.

As I said above, in most cases the W3C server gives the English document anyway, even if the URL has no .html at the end, but in some cases language negotiation is enabled and the shorter URL returns a translated document.

Use of HTML

Translations, like all Web documents, must be valid: they must use HTML and CSS according to the respective specifications. The W3C validators can check documents for errors: the W3C mark-up validator for the HTML part and the CSS validator for the CSS part.

Although invalid documents may display OK in most current browsers, valid documents have a much better chance of continuing to display in browsers of the future.

For more information about translations, see W3C Translations.

CSS Valid
CSS!

Bert Bos, CSS contact
Last updated $Date: 2011/05/06 11:54:31 $ GMT

Copyright  © 1997-2009 W3C (MIT, ERCIM, Keio)