Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Lang/doc: Difference between revisions

From Poets.Wiki
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{wikipedia|page name}}
{{wikipedia|page name}}
{{High-use|no-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}}
{{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 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 was developed to consolidate processing for {{tlx|Lang}}, , and {{tlx|Transliteration}} 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 html rendered is correct for browsers and screen readers.
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 was developed to consolidate processing for {{tlx|Lang}}, , and 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 html rendered is correct for browsers and screen readers.


Other templates that get language name support from this module are:
Other templates that get language name support from this module are:
Line 10: Line 8:


==Data set==
==Data set==
The data set is specified in [[Module:Lang/data]] and its included data modules:
The data set is specified in Module:Lang/data and its included data modules:
* language tag-and-name data
* language tag-and-name data
** [[Module:Lang/data/iana languages]] – from IANA [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry language-subtag-registry file]
** Module:Lang/data/iana languages – from IANA [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry language-subtag-registry file]
* language script data
* language script data
** [[Module:Lang/data/iana scripts]] – from IANA language-subtag-registry file
** Module:Lang/data/iana scripts – from IANA language-subtag-registry file
* language region data
* language region data
** [[Module:Lang/data/iana regions]] – from IANA language-subtag-registry file
** Module:Lang/data/iana regions – from IANA language-subtag-registry file
* language variant data
* language variant data
** [[Module:Lang/data/iana variants]] – from IANA language-subtag-registry file
** Module:Lang/data/iana variants – from IANA language-subtag-registry file
* suppressed-script data
* suppressed-script data
** [[Module:Lang/data/iana suppressed scripts]] – from IANA language-subtag-registry file
** Module:Lang/data/iana suppressed scripts – from IANA language-subtag-registry file


The data set also includes supplementary data modules:
The data set also includes supplementary data modules:
* override and other non-standard data
* 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 [https://www.loc.gov/standards/iso639-2/php/English_list.php Codes for the Representation of Names of Languages]
** 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/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/tag from name – reversed language tag-and-name data so that the language name is the key and the language tag is the value


== Testcases ==
== Testcases ==
* [[Module:Lang/testcases]] ([[Module talk:Lang/testcases|run]])
* Module:Lang/testcases (run)
* category_from_tag()
* 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-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-1 category from tag (A–H) (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-2 category from tag (I–N) (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-3-3 category from tag (O–Z) (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]])
** Module:Lang/testcases/ISO 639 deprecated and override category from tag (run)
* name_from_tag()
* 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-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-1 name from tag (A–H) (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-2 name from tag (I–N) (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-3-3 name from tag (O–Z) (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]])
** Module:Lang/testcases/ISO 639 deprecated and override name from tag (run)
* tag_from_name()
* 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-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-1 tag from name (A–H) (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-2 tag from name (I–N) (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-3-3 tag from name (O–Z) (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]])
** Module:Lang/testcases/ISO 639 deprecated and override tag from name (run)


==Tracking categories==
==Tracking categories==
Line 54: Line 52:
* {{Category link with count|Lang and lang-xx using deprecated ISO 639 codes}}
* {{Category link with count|Lang and lang-xx using deprecated ISO 639 codes}}


==See also==
MoS on foreign words:
* {{Section link|Wikipedia:Manual of Style/Text formatting#Foreign terms}}


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |

Latest revision as of 08:31, 14 April 2025

This page uses Creative Commons Licensed content from Wikipedia (view authors).

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 was developed to consolidate processing for {{Lang}}, , and 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 html rendered is correct for browsers and screen readers.

Other templates that get language name support from this module are:

Data set

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

  • language tag-and-name data
  • language script data
    • Module:Lang/data/iana scripts – from IANA language-subtag-registry file
  • language region data
    • Module:Lang/data/iana regions – from IANA language-subtag-registry file
  • language variant data
    • Module:Lang/data/iana variants – 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 Codes for the Representation of Names of Languages
    • 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

Testcases

  • Module:Lang/testcases (run)
  • category_from_tag()
    • Module:Lang/testcases/ISO 639-1 category from tag (|run)
    • Module:Lang/testcases/ISO 639-3-1 category from tag (A–H) (run)
    • Module:Lang/testcases/ISO 639-3-2 category from tag (I–N) (run)
    • Module:Lang/testcases/ISO 639-3-3 category from tag (O–Z) (run)
    • Module:Lang/testcases/ISO 639 deprecated and override category from tag (run)
  • name_from_tag()
    • Module:Lang/testcases/ISO 639-1 name from tag (run)
    • Module:Lang/testcases/ISO 639-3-1 name from tag (A–H) (run)
    • Module:Lang/testcases/ISO 639-3-2 name from tag (I–N) (run)
    • Module:Lang/testcases/ISO 639-3-3 name from tag (O–Z) (run)
    • Module:Lang/testcases/ISO 639 deprecated and override name from tag (run)
  • tag_from_name()
    • Module:Lang/testcases/ISO 639-1 tag from name (run)
    • Module:Lang/testcases/ISO 639-3-1 tag from name (A–H) (run)
    • Module:Lang/testcases/ISO 639-3-2 tag from name (I–N) (run)
    • Module:Lang/testcases/ISO 639-3-3 tag from name (O–Z) (run)
    • Module:Lang/testcases/ISO 639 deprecated and override tag from name (run)

Tracking categories