Documentation Internationalization

From Chakra | Wiki
Jump to: navigation, search
Preferences-desktop-locale.pngDocumentation Internationalization
a comprehensive guideline for Chakra Wiki internationalization and localization.

Guidelines

Article titles

Non-English article titles should be of the form Title in English/languagecode where languagecode is the language code for the language. For example: Main Page/ru.

Rationale:

  • English titles facilitate administration; all admins and sysops understand English, but may not be bilingual. When browsing Recent Changes and other special pages, admins need to know what is being edited without resorting to external translation programs.
  • Standardized article titles simplify inter-language linking and allow for the creation of internationalization templates such as this one.

Categories

There should be a main category for each language, with the localized language name as title. For example, Català for Catalan. Those categories must be categorized in the Pages by language category.

Articles' categories must be translated. In case a category title can be understood in more than just one language (i.e. "Guía de Chakra GNU/Linux" could be both Spanish and Galician), instead of just the localized text, they should follow the sintax "Lokalized Text (Language)" where "Language" is the localized spelling of said language (i.e. "Guía de Chakra GNU/Linux (español)" and "Guía de Chakra GNU/Linux (galego)").

Inter-language links

The I18n template should be included in every article to display a list of available translations (it is included in the Header template when used with the "type=main" option). To learn how to use that template, have a look at its article.

Rationale:

  • Maintaining separate inter-language links for each translation is unrealistic and error-prone. The I18n template makes use of standardized article titles described above to generate a complete and consistent list across translations.
  • Including inter-language links at the beginning of an article allows international readers to promptly determine whether content is available in their language, and similarly allows translators to ascertain whether an article requires translation.

Internal links

The internal links, those who link to other pages of the wiki, should be written with the {{link}} template instead of the common Mediawiki syntax. This is because this template allows you to link to any page, and if it's available in the same language as the one in which the link is, it will link to that localized page. If such a localized page does not exist, it will link to the English version instead.

This is the syntax of the template:

{{link|article|text|section}}

Where:

  • article will be the English title of the article we want to link. I.e. Frequently Asked Questions.
  • text is an optional text, for those (common) situations where the name of the English article doesn't match the localized name, or when you just want a text different from the linked article to be displayed.
  • section is an optional parameter to link to a specific section inside an article. As an example, to link to this section, you would use something like this: {{link|Documentation Internationalization|Usage of internal links|Internal links}}, which would look like Usage of internal links. Is the parameter is given as empty but exists, it will be equal to text by default, so {{link|Documentation Internationalization|Internal links|}} would look like Internal links.

External links

Links to localized versions of Wikipedia

When translation a page of the wiki, you might find a code like this:

[[Wikipedia:Article|text]]

If the linked Wikipedia article is present in the Wikipedia edition in your language, you can link to it following the syntax:

[[Wikipedia:languagecode:Article|text]]

Where languagecode would be the code of the language you want to link to (ar, ca, it...). Example:

[[Wikipedia:KDE|KDE software]] → [[Wikipedia:de:KDE|KDE Software]]

New languages

Languages in I18n template are added as someone wants to translate a page of Chakra Wiki into a new language not listed in the template. If your language is not listed there and you want to translate any page into your language, just edit the template to add it. Languages are organized according to its language code, and language code is the only thing you need to add a new language to the template.

If you don't know how to add your language to the I18n template or you have trouble finding your right language code, ask for help.

Also, if you are going to start with a translation, you should probably start with the Main Page.

Templates

Sometimes templates are used in Chakra wiki to make some changes easier, or to reduce the amount of repeated code or text between pages or in the same page. Some of them, those containing text, need to be localized. Here is a list of those which can already be localized:

Also, some templates get some parameters. Some of them must be translated, some mustn't. An example is the {{Header}} template. The template itself is not yet internationalized, but you can change the way the template is used in the localized page. That is, some of the template fields should be translated, some shouldn't. Here you can see which ones are those:

{{Header
|type        = Not translatable
|name        = Should be translated
|link        = A language code should be append to this value this way: TITLE/languagecode. Example: TITLE/gl
|image       = Not translatable
|description = Should be translated
|url         = Should be changed only if a localized version exists
|urltype     = Not internationalized yet
|package     = Not internationalized yet
|groups      = Not internationalized yet
|index       = Not translatable
}}

How to know when a translation needs to be updated

{{Outdated}} template should be used by editors to mark translations as outdated when modifying the English documentation, so make sure you localize the template into your language, and you can watch the maintenance category it adds to articles in your language for new outdated pages. Instructions to use and localize the template are in its page.