CCWiki:Translate

From Creative Commons
Revision as of 13:58, 27 April 2011 by Hamilton Abreu (talk | contribs)
Jump to: navigation, search

This is a multilingual wiki; content can be translated into multiple languages regardless of the original language.

Preparation

The following templates are used to manage translations in the pages written in English:

There is a third, Template:Diff since trans, which is a support template used by the second. They are language interfaces that provide, to the real code behind, strings to be displayed to users, in English.

If these templates have not yet been translated to your language, you should translate the three of them first (see next section for how to do this — also see the European Portuguese (pt:) versions of the templates for a practical example; you can, inclusively, translate the parameter names of the templates).

Once they have been translated to your language, you should use the translated versions in the pages in your language, instead of the English ones. Generally, the English templates should be used in the pages in English, the German translations in the pages in German, the Hebrew translations in the pages in Hebrew, and so forth. This applies to all discussions below.

Translating

Follow these steps to translate an article. For the purposes of illustration, the article is called Example Content and we will translate the article to Spanish.

  • Create a new article called Es:Contenido del Ejemplo. The contents should be a translation of Example Content. Note that the page name is made up of the language code and the translated title, separated by a colon (:). See Naming Translated Pages below for additional details
  • To the bottom of page Es:Contenido del Ejemplo add the Spanish equivalent of:
{{Translated From
| source = Example Content
| rev = <revision ID of page Example Content>
}}
  • To the bottom of Example Content add:
{{Translations
| articles = Es:Contenido del Ejemplo
}}
Note: To get the <revision ID of page Example Content>, go to page Example Content and place the pointer over the link "Permanent link" at the top of the page; the revision ID will appear at the end of the URL near the bottom of your browser. It is also available from the history of the page, placing the pointer over the link to the last revision. Is is also shown in the languages box, in the link to the source language.
Note: If an article is available in more than two languages, separate the translated article names with commas in template Translations.
Note: For pages outside the main namespace, the namespace must always be specified at the beginning of the name.

A box appears in each article listing the languages in which the article is available. Next to the name of your language one of two indicators will appear:

  • A ✔ if the latest revision of Example Content is equal to the revision ID supplied in parameter rev. This indicates that Es:Contenido del Ejemplo is up-to-date, since it is based on the latest version of the source page.
  • A "(synchronise)" link if the latest revision of Example Content is different from the revision ID supplied in parameter rev. This indicates that Es:Contenido del Ejemplo is outdated. Clicking the "(synchronise)" link produces a list of the changes made to Example Content since it was translated. To bring the translation into synch again, incorporate those changes in Es:Contenido del Ejemplo and update the revision ID to the latest one.

Eventually you will be able to read the entire wiki in your language.

Naming Translated Pages

The page name of pages outside the main namespace, must be preceeded by the namespace (see subsection Namespace Prefix below for details).

When naming the translated page, the original page name should be translated.

To distinguish between identically spelt translated titles in different languages, language code prefixes are used (see subsection Language Code Prefix below for details).

The language code prefix should be followed by a colon (:) in all namespaces except "File:", where a space ( ) must be used instead (see subsection Exception for the File: namespace below for details).

So:

Again, please note that, for files, a space ( ) is used after the language code, instead of a colon (:).

Language Code Prefix

The language code must be supported by MediaWiki. A full list of the supported language codes can be found at TranslateWiki: SupportedLanguages.

Namespace Prefix

If the original page title has a namespace prefix, the same prefix needs to appear before language prefixes in the name of the translated page. For example, if you are translating this page (CC Wiki:Translate) into Spanish (es), the resulting page name would start with CC Wiki:Es:....

Exception for the File: namespace

When translating images, follow the language prefix guidelines above with the exception that the prefix should be followed by a space ( ) rather than a colon (:). For example, the Portuguese (pt) translation of File:Casestudies-splash.jpg is File:Pt Casos de estudo.png.

This exception is justified by the fact that MediaWiki automatically changes colons to dashes (-) in the title of the file description page. Since dashes are already used to separate language, region and script codes, using a space instead of a dash allows the page name to be exploded unambiguosly.

Categorisation of pages

There are a couple of issues with the categorisation of pages.

By default, in categories, the pages are sorted according to their full name, including the namespace. All pages in the "Category:" namespace, for example, will be listed in categories under the heading "C".

Since we prefix page names with the language code, even in the main namespace there will be sorting issues. For example, by default all pages in the main namespace written in German will be listed in the categories under the heading "D", because all pages in German start by "De:".

To overcome these, the translation templates automatically assign a default sort key to pages, which causes the page to be sorted under the part of its name after the language code.