跳转到内容

模組:Lang/doc

维基百科,自由的百科全书

这是本页的一个历史版本,由TongcyDai留言 | 贡献2018年1月3日 (三) 02:08 建立内容为“This module exists primarily to provide correct html markup for non-English language text where that text is used in the English Wikipedia. It has…”的新页面)编辑。这可能和当前版本存在着巨大的差异。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)

这是Module:Lang的文档页面

This module exists primarily to provide correct html markup for non-English language text where that text is used in the English Wikipedia. It has a secondary purpose of providing correct visual rendering for this non-English text. The module consolidates processing for {{lang}} and the many {{lang-??}} templates into a single source and uses a clearly defined data set extracted from international standards.

The data set is specified in Module:Language/name/data and its included data modules:

language code-and-name data
Module:Language/data/iana languages – from IANA language-subtag-registry file
Module:Language/data/ISO 639-3 – from sil.org UTF-8 Complete Code Tables Set
Module:Language/data/wp languages – sourcing for the data in this module is unknown
language script data
Module:Language/data/iana scripts – from IANA language-subtag-registry file
language region data
Module:Language/data/iana regions – from IANA language-subtag-registry file
language variant data
Module:Language/data/iana variants – from IANA language-subtag-registry file
suppressed-script data
Module:Language/data/iana suppressed scripts – from IANA language-subtag-registry file

The data set also includes supplementary data modules:

override and other non-standard data
Module:Lang/data – For example, when IANA disagrees with ISO 639-3 or when the standard language name is cumbersome or contains information not suitable for use in article space, the override table can hold that language information
Module:Lang/ISO 639 synonyms – maps three character ISO 639-2, -2T, -3 codes to two character ISO 639-1 codes – from Codes for the Representation of Names of Languages

The module does not require the myriad {{ISO 639 name ??}} templates, {{Language with name}}, {{Language with name and transliteration}}, and {{transl}}. It provides error checking and reporting to ensure that the html rendered is correct for browsers and screen readers.

Articles that have errors are placed in:

Category:lang and lang-xx template errors (mainspace only)

Maintenance categories:

Category:Lang and lang-xx code promoted to ISO 639-1

MOS on foreign words:

Wikipedia:Manual of Style/Text formatting#Foreign terms