Module:Lang/doc: Difference between revisions

Content deleted Content added
m "HTML"
 
(34 intermediate revisions by 12 users not shown)
Line 1:
{{High-use|no-percent=yes}}
{{Language templates}}
{{Lua|Module:Arguments|Module:No globalsLang/configuration|Module:Lang/data|Module:Lang/ISO 639 synonyms|Module:Language/name/data|Module:Lang/nametag tofrom tagname|Module:Unicode data|Module:Yesno}}
{{High-use}}
{{Lua|Module:Arguments|Module:No globals|Module:Lang/data|Module:Lang/ISO 639 synonyms|Module:Language/name/data|Module:Lang/name to tag|Module:Unicode data|Module:Yesno}}
 
This module exists primarily to provide correct htmlHTML markup for non-Englishnon–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 was developed to consolidate processing for {{tlx|Langlang}}, the {{cltlx|Lang-x_templates|{{tld|lang-??langx}}}} (most), and {{tlx|Transltransliteration}} templates into a single source and to use a clearly defined data set extracted from international standards. It provides error checking and reporting to ensure that the htmlHTML rendered is correct for browsers and screen readers.
 
Other templates that get language name support from this module are:
* {{tlx|Nativenative name}}
 
==Data set==
The data set is specified in [[Module:Language/nameLang/data]] and its included data modules:
* language tag-and-name data
** [[Module:LanguageLang/data/iana languages]] – from IANA [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry language-subtag-registry file]
** [[Module:Language/data/ISO 639-3]] – from [http://www-01.sil.org/iso639-3/download.asp 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:LanguageLang/data/iana scripts]] – from IANA language-subtag-registry file
* language region data
** [[Module:LanguageLang/data/iana regions]] – from IANA language-subtag-registry file
* language variant data
** [[Module:LanguageLang/data/iana variants]] – from IANA language-subtag-registry file
* suppressed-script data
** [[Module:LanguageLang/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 <code>override</code> 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 [https://www.loc.gov/standards/iso639-2/php/English_list.php Codes for the Representation of Names of Languages]
** [[Module:Lang/nametag tofrom tagname]] – reversed language tag-and-name data so that the language name is the key and the language tag is the value
 
== Testcases ==
Line 33 ⟶ 30:
* category_from_tag()
** [[Module:Lang/testcases/ISO 639-1 category from tag]] ([[Module talk:Lang/testcases/ISO 639-1 category from tag|run]])
** [[Module:Lang/testcases/ISO 639-23-1 category from tag]] (A–H) ([[Module talk:Lang/testcases/ISO 639-23-1 category from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-12 category from tag]] (A-HI–N) ([[Module talk:Lang/testcases/ISO 639-3-12 category from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-23 category from tag]] (I-NO–Z) ([[Module talk:Lang/testcases/ISO 639-3-23 category from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-3 deprecated and override category from tag]] (O-Z) ([[Module talk:Lang/testcases/ISO 639-3-3 deprecated and override category from tag|run]])
** [[Module:Lang/testcases/ISO 639-5 category from tag]] ([[Module talk:Lang/testcases/ISO 639-5 category from tag|run]])
** [[Module:Lang/testcases/ISO 639 deprecated category from tag]] ([[Module talk:Lang/testcases/ISO 639 deprecated category from tag|run]])
** [[Module:Lang/testcases/iana variants category from tag]] ([[Module talk:Lang/testcases/iana variants category from tag|run]])
* name_from_tag()
** [[Module:Lang/testcases/ISO 639-1 name from tag]] ([[Module talk:Lang/testcases/ISO 639-1 name from tag|run]])
** [[Module:Lang/testcases/ISO 639-23-1 name from tag]] (A–H) ([[Module talk:Lang/testcases/ISO 639-23-1 name from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-12 name from tag]] (A-HI–N) ([[Module talk:Lang/testcases/ISO 639-3-12 name from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-23 name from tag]] (I-NO–Z) ([[Module talk:Lang/testcases/ISO 639-3-23 name from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-3 deprecated and override name from tag]] (O-Z) ([[Module talk:Lang/testcases/ISO 639-3-3 deprecated and override name from tag|run]])
** [[Module:Lang/testcases/ISO 639-5 name from tag]] ([[Module talk:Lang/testcases/ISO 639-5 name from tag|run]])
** [[Module:Lang/testcases/ISO 639 deprecated name from tag]] ([[Module talk:Lang/testcases/ISO 639 deprecated name from tag|run]])
** [[Module:Lang/testcases/iana variants name from tag]] ([[Module talk:Lang/testcases/iana variants name from tag|run]])
* tag_from_name()
** [[Module:Lang/testcases/ISO 639-1 tag from name]] ([[Module talk:Lang/testcases/ISO 639-1 tag from name|run]])
** [[Module:Lang/testcases/ISO 639-23-1 tag from name]] (A–H) ([[Module talk:Lang/testcases/ISO 639-23-1 tag from name|run]])
** [[Module:Lang/testcases/ISO 639-3-12 tag from name]] (A-EI–N) ([[Module talk:Lang/testcases/ISO 639-3-12 tag from name|run]])
** [[Module:Lang/testcases/ISO 639-3-23 tag from name]] (F-KO–Z) ([[Module talk:Lang/testcases/ISO 639-3-23 tag from name|run]])
** [[Module:Lang/testcases/ISO 639-3-3 deprecated and override tag from name]] (L-R) ([[Module talk:Lang/testcases/ISO 639-3-3 deprecated and override tag from name|run]])
** [[Module:Lang/testcases/ISO 639-3-4 tag from name]] (S-W) ([[Module talk:Lang/testcases/ISO 639-3-4 tag from name|run]])
** [[Module:Lang/testcases/ISO 639-3-5 tag from name]] (X-Z) ([[Module talk:Lang/testcases/ISO 639-3-5 tag from name|run]])
** [[Module:Lang/testcases/ISO 639-5 tag from name]] ([[Module talk:Lang/testcases/ISO 639-5 tag from name|run]])
** [[Module:Lang/testcases/ISO 639 deprecated tag from name]] ([[Module talk:Lang/testcases/ISO 639 deprecated tag from name|run]])
** [[Module:Lang/testcases/iana variants tag from name]] ([[Module talk:Lang/testcases/iana variants tag from name|run]])
 
Maintenance==Tracking categories:==
==Error messages and categorization==
* {{Category link with count|translLang and lang-xx template errors}}
Mainspace articles that have errors are placed in appropriate error categories:
* {{Category link with count|lang and lang-xxTransliteration template errors}}
* {{Category link with count|transl template errors}}
 
Maintenance categories:
* {{Category link with count|Lang and lang-xx code promoted to ISO 639-1}}
* {{Category link with count|Lang and lang-xx using deprecated ISO 639 codes}}
 
==See also==
Line 77 ⟶ 61:
[[Category:Language-related modules]]
[[Category:Modules that check for strip markers]]
 
}}</includeonly><noinclude>
[[Category:Module documentation pages]]
</noinclude>