Difference between revisions of "Module:Language/data/iana languages/make/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Gonnym
(uses lua)
blackwiki>Trappist the monk
(Created page with '{{tl|Module rating |<!-- Values: pre-alpha • alpha • beta • release • protected -- If a rating not needed/relevant, delete this template call -->}} <!...')
Line 1: Line 1:
{{Lua|Module:No globals}}
+
{{tl|Module rating |<!-- Values: pre-alpha • alpha • beta • release • protected  -- If a rating not needed/relevant, delete this template call -->}}
 
+
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
This is a crude tool that reads a local copy of an IANA [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry language-subtag-registry file] and extracts the information necessary to create the data tables held by:
 
* [[Module:Language/data/iana languages]]
 
* [[Module:Language/data/iana scripts]]
 
* [[Module:Language/data/iana regions]]
 
* [[Module:Language/data/iana variants]]
 
* [[Module:Language/data/iana suppressed scripts]]
 
 
 
The tool skips records that contain the words: 'Deprecated', 'Preferred-Value', and 'Private use'.
 
 
 
At this writing, the tool extracts only the subtag code and description(s) from language, script, region, and variant records.
 
 
 
 
== Usage ==
 
== Usage ==
To use this tool:
 
# Open a blank sandbox page and paste the following at the top:
 
#: <code><nowiki>{{#invoke:Language/data/iana/make|iana_extract}}</nowiki></code>
 
# Go to the current [https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry language-subtag-registry file] (or any of the files held by [https://web.archive.org/web/*/https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry archive.org]). Copy the whole (or just as much as you need) and paste it into the sandbox page below the <code><nowiki>{{#invoke:}}</nowiki></code>.
 
# Click Show preview
 
# Wait
 
# Copy result
 
  
There is some crude error checking that will insert an error message in the output.  No guarantees that such messaging will be helpful.  Search for the word 'error' in the tool's output.
+
<code><nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''function_name''}}</code>
  
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
<!-- Categories below this line, please; interwikis at Wikidata -->
 
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Language-related modules]]
+
 
 
}}</includeonly>
 
}}</includeonly>

Revision as of 02:52, 3 September 2020

{{Module rating }}

Usage

{{#invoke:Language/data/iana languages/make|function_name}}