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

From blackwiki
Jump to navigation Jump to search
blackwiki>Gonnym
(added category)
m (14 revisions imported)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Lua|Module:No globals}}
 +
 
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:
 
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 languages]]
*[[Module:Language/data/iana scripts]]
+
* [[Module:Language/data/iana scripts]]
*[[Module:Language/data/iana regions]]
+
* [[Module:Language/data/iana regions]]
*[[Module:Language/data/iana variants]]
+
* [[Module:Language/data/iana variants]]
*[[Module:Language/data/iana suppressed scripts]]
+
* [[Module:Language/data/iana suppressed scripts]]
 +
* [[Module:Language/data/ISO 639-1]] – not an IANA file per se, but used by [[Module:ISO 639 name]]; included here so that -1 is not neglected when the other files are updated
  
 
The tool skips records that contain the words: 'Deprecated', 'Preferred-Value', and 'Private use'.
 
The tool skips records that contain the words: 'Deprecated', 'Preferred-Value', and 'Private use'.
Line 12: Line 15:
 
== Usage ==
 
== Usage ==
 
To use this tool:
 
To use this tool:
#Open a blank sandbox page and paste the following at the top:
+
# Open a blank sandbox page and paste the following at the top:
#:<code><nowiki>{{#invoke:Language/data/iana/make|iana_extract}}</nowiki></code>
+
#: <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>.
+
# 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
+
# Click Show preview
#Wait
+
# Wait
#Copy result
+
# 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.
 
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.

Latest revision as of 05:55, 27 September 2020

This is a crude tool that reads a local copy of an IANA language-subtag-registry file and extracts the information necessary to create the data tables held by:

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

To use this tool:

  1. Open a blank sandbox page and paste the following at the top:
    {{#invoke:Language/data/iana/make|iana_extract}}
  2. Go to the current language-subtag-registry file (or any of the files held by archive.org). Copy the whole (or just as much as you need) and paste it into the sandbox page below the {{#invoke:}}.
  3. Click Show preview
  4. Wait
  5. 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.