Open main menu

共享资源:本地化

This page is a translated version of a page Commons:Localization and the translation is 39% complete. Changes to the translation template, respectively the source language can be submitted through Commons:Localization and have to be approved by a translation administrator.
Outdated translations are marked like this.
"COM:LOC" redirects here. For information on the Library of Congress, see Commons:Library of Congress.

Shortcuts: COM:I18N· COM:INT

Other languages:
Deutsch • ‎English • ‎Tagalog • ‎català • ‎dansk • ‎français • ‎italiano • ‎magyar • ‎polski • ‎português • ‎svenska • ‎русский • ‎українська • ‎العربية • ‎नेपाली • ‎मराठी • ‎中文 • ‎日本語 • ‎한국어

维基共享资源是国际化并因此多语言的项目。诚然英语是默认语言,任何语言和地区都会乐于使用。

维基共享资源是国际化并因此多语言的项目。诚然英语是默认语言,项目的构想是用于任何语言。国际化是设计软件必定经历的步骤,因此任何语言和地区都会乐于使用,不需要工程更改。本地化是适应国际化软件面向特定地区或语言群发布的步骤,通常就是指加入地区特性支持和翻译文本。国际化和本地化大量应用于共享资源。

  1. 软件
    1. MediaWiki软件(及其用于共享资源的扩展)
    2. MediaWiki可以进行定制化的交互界面
    3. User scripts (especially gadget scripts, installable via your Preferences)
  2. 内容
    1. 项目页面
    2. 内容页面(文件、分类、图库)
    3. Templates used on content pages and project pages

软件

MediaWiki默认信息

MediaWiki是共享资源运行的软件。MediaWiki的界面翻译(翻译在MediaWiki安装时提供)由Translatewiki接管和进行;请点击左侧链接进行贡献。

要检查translatewiki详细的MediaWiki信息的本地化,访问translatewiki:Special:Translations/MediaWiki:并输入MediaWiki信息的名称。要查找详细的MediaWiki信息,访问共享资源显示特定信息的页面并加入?uselang=qqx至URL。之后应刷新页面以还原语言设置。(使用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

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.

用户脚本

内容

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

项目页面

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 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

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.

See most used translatable templates and modules.

內容國際化的方法

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.

自動翻譯

Further information: Help:Autotranslate

其他

备注

  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.

参见