Commons:Localization

From Wikimedia Commons, the free media repository
(Redirected from Commons:Localização)
Jump to: navigation, search

"COM:LOC" redirects here. For information on the Library of Congress, see Commons:Library of Congress.

Shortcut: COM:I18N · COM:INT

Other languages:
català • ‎Deutsch • ‎English • ‎français • ‎magyar • ‎italiano • ‎日本語 • ‎한국어 • ‎नेपाली • ‎polski • ‎русский • ‎svenska • ‎Tagalog • ‎українська • ‎中文

Wikimedia Commons is an international and thus multilingual project. While the default language here is English, the project is intended to be usable by and useful to people no matter what local language they read.

Internationalization is the process of designing a software application so that it can be adapted to various languages and regions without engineering-level changes. Localization is the process of adapting internationalized software for a specific region or language by adding locale-specific components and translating text. The internationalization and localization effort on Commons has several components.

  1. Software
    1. The MediaWiki software (and the extensions to it used by Commons)
    2. Customisable parts of the MediaWiki interface
    3. User scripts (especially gadget scripts, installable via your Preferences)
  2. Content
    1. Project pages
    2. Content pages (files, categories, galleries)
    3. Templates used on content pages and project pages

Software[edit]

MediaWiki default messages[edit]

MediaWiki is the software that Commons is run on. Translations of the MediaWiki interface (translations supplied with the installation of MediaWiki) are created on Translatewiki; please follow the link to contribute.

To check translatewiki localizations of a particular MediaWiki message, visit translatewiki:Special:Translations/MediaWiki: and enter the name of the MediaWiki message. To find the name of a particular MediaWiki message, visit the Commons page showing the message and add ?uselang=qqx to the URL. Reloading the page should then replace all message text with the name of the message producing that text. (Example using Commons:Localization)

MediaWiki messages can be accessed within Commons (e.g., in a template) via {{int:messagename}}, e.g., {{int:edit-conflict}} to access MediaWiki:edit-conflict. Localized versions of MediaWiki messages are stored in subpages named with the relevant language code, e.g., MediaWiki:edit-conflict/de and MediaWiki:edit-conflict/fr. Non-existent messages (including misspelling of actual messages) will display in angle-brackets (<message name>), such as the common mistake of coding "{{int:license}}" as "{{int:licensing}}" (which displays the incorrect result in angle-brackets as: ⧼licensing⧽).

For a list of some MediaWiki messages which may be useful in templates, see Commons:Localization/useful MediaWiki messages. See also mw:Localisation and its system messages.

Commons MediaWiki: namespace custom messages[edit]

The text of default messages supplied with the installation of MediaWiki can be overridden locally.[1] In addition, completely new messages can be created in the MediaWiki: namespace for purposes of localization. In both cases, such "custom messages" will only be available on Commons' installation of MediaWiki.

User scripts[edit]

Content[edit]

About localization text in images see Translation text in images. For localization read below.

Project pages[edit]

Project pages (in the Commons: and Help: namespaces) are important to translate. A new user visiting Commons may not know much about Commons and its purpose. Project pages explain the scope of Commons, what content is appropriate and what content not, how uploading works and what rules are to be observed.

Important pages to translate:

Content pages[edit]

Content pages are categories, galleries, and file description pages. Localization of these has two elements:

  1. Standard text elements. These should normally be included via appropriate content templates. For example, a category may include the template {{See also}}, which provides the text "see also" in various languages. In a few cases, standard text elements that are part of the MediaWiki software can be accessed directly, using the construction {{int:mediawiki-message-name}}.
  2. Non-standard text elements. These are included directly on the page, but should be wrapped in translation templates so that if/when translations are added, the software can distinguish them. The usual means are the simple language templates or the {{LangSwitch}} or {{mld}} templates.

Content templates[edit]

Templates are strings of text that occur on dozens, thousands or even millions of pages. By translating the most widely used templates you can greatly extend the usefulness of Commons pages to speakers of your language who do not speak English or who do feel more comfortable in their native tongue. Template:Information for example is used on more than two million file description pages. It's just some short strings of text, but it can greatly help to make the information on the description pages be more accessible. (Not all templates can be translated, some don't need translation, because they are language-neutral).

If a template is already internationalised, it should be clear how to add a new language localization. (The template documentation should make this clear, or it may be obvious when you look at the template in edit mode.) If a template is not yet internationalised, see the section below.

The 35 most used translatable templates and modules as of July 2017 were:

  1. Template:Dir‏‎ (used on 49,155,853 pages)
  2. Module:Yesno‏‎ (used on 41,346,868 pages)
  3. Module:I18n/date‏‎ (used on 41,187,175 pages)
  4. Module:Date‏‎ (used on 41,187,171 pages)
  5. Module:ISOdate‏‎ (used on 41,148,972 pages)
  6. Template:License template tag‏‎ (used on 41,005,887 pages)
  7. Module:TemplatePar‏‎ (used on 40,892,350 pages)
  8. Template:ISOdate‏‎ (used on 40,706,581 pages)
  9. Template:Infobox template tag‏‎ (used on 40,671,517 pages)
  10. Template:ISOyear‏‎ (used on 40,355,698 pages)
  11. Template:Years since‏‎ (used on 40,273,436 pages)
  12. Module:Fallbacklist‏‎ (used on 39,993,112 pages)
  13. Module:Fallback‏‎ (used on 39,993,111 pages)
  14. Template:Parse source‏‎ (used on 38,352,008 pages)
  15. Template:Lang‏‎ (used on 37,244,888 pages)
  16. Template:Information‏‎ (used on 37,085,238 pages)
  17. Template:Information/author processing‏‎ (used on 36,951,889 pages)
  18. Module:String‏‎ (used on 34,346,545 pages)
  19. Template:IfNum‏‎ (used on 31,784,662 pages)
  20. Template:CC-Layout‏‎ (used on 31,629,336 pages)
  21. Template:Description‏‎ (used on 28,354,192 pages)
  22. Template:Autotranslate‏‎ (used on 26,618,271 pages)
  23. Template:Cc-by-sa-layout‏‎ (used on 23,069,852 pages)
  24. Template:Own‏‎ (used on 18,986,796 pages)
  25. Template:LangSwitch‏‎ (used on 17,933,223 pages)
  26. Template:En‏‎ (used on 17,643,382 pages)
  27. Template:Self/is-pd-expired‏‎ (used on 17,290,727 pages)
  28. Template:Self‏‎ (used on 17,290,725 pages)
  29. Template:Edit‏‎ (used on 14,172,793 pages)
  30. Module:I18n/coordinates‏‎ (used on 12,018,572 pages)
  31. Module:Coordinates‏‎ (used on 12,018,550 pages)
  32. Template:IsNum‏‎ (used on 10,913,410 pages)
  33. Template:Location‏‎ (used on 9,286,926 pages)
  34. Template:Cc-by-sa-3.0‏‎ (used on 9,256,131 pages)
  35. Template:PD-Layout‏‎ (used on 8,577,266 pages)

Content internationalization methods[edit]

The major methods for internationalization are

  1. Autotranslate, using the {{Autotranslate}} template, which uses subpages in the standard /xx language code format to store localizations
  2. LangSwitch, using the {{LangSwitch}} template, which stores localizations within the page or template being translated.
  3. Simple list, using a header linking to different language versions of a page.
  4. Language templates, using the individual templates listed at Commons:Language templates
  5. Multilingual tags are templates devoted to translating a particular message, without providing any formatting, for re-use in multiple templates.
  6. MediaWiki messages - in a few cases, standard text elements that are part of the MediaWiki software can be accessed directly, using the construction {{int:mediawiki-message-name}}

Content templates with complex layouts tend to use {{Autotranslate}}, whilst simpler ones use {{LangSwitch}}. Content pages largely use LangSwitch or language templates, with a handful of MediaWiki messages. The "simple list" method is generally used only by project pages. Multilingual tags and most MediaWiki messages are normally used only by templates. For templates, {{TemplateBox}} facilitates creating a documentation page, including providing a standard explanation of how to localise the template for a new language version, given the specified internationalization method.

An additional method is demonstrated by {{talkbox}}, which supports the construction of talkpage templates (e.g., {{permprot}}). Here, the translations are stored in subpages of the calling template, and {{talkbox}} switches the content as needed. The approach is similar to autotranslate, but the setup of the subpages is slightly different, and there is no /layout subpage.

Autotranslate[edit]

Further information: Help:Autotranslate

Other[edit]

Notes[edit]

  1. "Default messages" includes those which are supplied as part of MediaWiki, and the additional wm- messages (e.g., MediaWiki:wm-license-information-description) provided by mw:Extension:WikimediaMessages.

See also[edit]

Help[edit]