Module:Lang/doc: Difference between revisions

Content deleted Content added
m ce;
m "HTML"
 
(55 intermediate revisions by 16 users not shown)
Line 1:
{{High-riskuse|646000no-percent=yes}}
{{Language templates}}
{{Lua|Module:Arguments|Module:Lang/configuration|Module:Lang/data|Module:Lang/ISO 639 synonyms|Module:Lang/tag from name|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 consolidateswas developed to consolidate processing for {{tlx|lang}}, the {{cl|lang-x_templatestlx|{{tld|lang-??langx}}}} (most), and {{tlx|transltransliteration}} templates into a single source and usesto use a clearly defined data set extracted from international standards. It provides error checking and reporting to ensure that the HTML rendered is correct for browsers and screen readers.
 
Other templates that get language name support from this module are:
The data set is specified in [[Module:Language/name/data]] and its included data modules:
* {{tlx|native name}}
:;language code-and-name data
 
::[[Module:Language/data/iana languages]] – from IANA [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry language-subtag-registry file]
==Data set==
::[[Module:Language/data/ISO 639-3]] – from [http://www-01.sil.org/iso639-3/download.asp sil.org UTF-8 Complete Code Tables Set]
::The data set is specified in [[Module:LanguageLang/data/wp languages]] and sourcingits for theincluded data in this module is unknownmodules:
:;* language scripttag-and-name data
::** [[Module:LanguageLang/data/iana scriptslanguages]] – from IANA [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry language-subtag-registry file]
:;* language regionscript data
::** [[Module:LanguageLang/data/iana regionsscripts]] – from IANA language-subtag-registry file
:;* language variantregion data
::** [[Module:LanguageLang/data/iana variantsregions]] – from IANA language-subtag-registry file
:;suppressed-script* language variant data
::** [[Module:LanguageLang/data/iana suppressed scriptsvariants]] – from IANA language-subtag-registry file
* suppressed-script data
** [[Module:Lang/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/ISO 639 synonyms]] – maps three character ISO 639-2, -2T, -3 codes to two character ISO 639-1 codes – from [httphttps://www.loc.gov/standards/iso639-2/php/English_list.php Codes for the Representation of Names of Languages]
::[[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/tag from name]] – reversed language tag-and-name data so that the language name is the key and the language tag is the value
::[[Module:Lang/ISO 639 synonyms]] – maps three character ISO 639-2, -2T, -3 codes to two character ISO 639-1 codes – from [http://www.loc.gov/standards/iso639-2/php/English_list.php Codes for the Representation of Names of Languages]
 
== Testcases ==
The module does not require the myriad {{tld|ISO 639 name ??}} templates, {{tlx|Language with name}}, {{tlx|Language with name and transliteration}}, and {{tlx|transl}}. It provides error checking and reporting to ensure that the html rendered is correct for browsers and screen readers.
* [[Module:Lang/testcases]] ([[Module talk:Lang/testcases|run]])
* 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-3-1 category from tag]] (A–H) ([[Module talk:Lang/testcases/ISO 639-3-1 category from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-2 category from tag]] (I–N) ([[Module talk:Lang/testcases/ISO 639-3-2 category from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-3 category from tag]] (O–Z) ([[Module talk:Lang/testcases/ISO 639-3-3 category from tag|run]])
** [[Module:Lang/testcases/ISO 639 deprecated and override category from tag]] ([[Module talk:Lang/testcases/ISO 639 deprecated and override 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-3-1 name from tag]] (A–H) ([[Module talk:Lang/testcases/ISO 639-3-1 name from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-2 name from tag]] (I–N) ([[Module talk:Lang/testcases/ISO 639-3-2 name from tag|run]])
** [[Module:Lang/testcases/ISO 639-3-3 name from tag]] (O–Z) ([[Module talk:Lang/testcases/ISO 639-3-3 name from tag|run]])
** [[Module:Lang/testcases/ISO 639 deprecated and override name from tag]] ([[Module talk:Lang/testcases/ISO 639 deprecated and override 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-3-1 tag from name]] (A–H) ([[Module talk:Lang/testcases/ISO 639-3-1 tag from name|run]])
** [[Module:Lang/testcases/ISO 639-3-2 tag from name]] (I–N) ([[Module talk:Lang/testcases/ISO 639-3-2 tag from name|run]])
** [[Module:Lang/testcases/ISO 639-3-3 tag from name]] (O–Z) ([[Module talk:Lang/testcases/ISO 639-3-3 tag from name|run]])
** [[Module:Lang/testcases/ISO 639 deprecated and override tag from name]] ([[Module talk:Lang/testcases/ISO 639 deprecated and override tag from name|run]])
 
Maintenance==Tracking categories:==
Mainspace articles that have errors are placed in appropriate error categories:
:* {{clCategory link with count|langLang and lang-xx template errors}}
:* {{clCategory link with count|translTransliteration template errors}}
:* {{clCategory 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==
Maintenance categories:
MOSMoS on foreign words:
:{{cl|Lang and lang-xx code promoted to ISO 639-1}}
:[[* {{Section link|Wikipedia:Manual of Style/Text formatting#Foreign terms]]}}
 
MOS on foreign words:
:[[Wikipedia:Manual of Style/Text formatting#Foreign terms]]
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Language-related modules]]
[[Category:Modules that check for strip markers]]
}}</includeonly>
 
}}</includeonly><noinclude>
[[Category:Module documentation pages]]
</noinclude>