Toolserver:~hippietrail/langmetadata.fcgi

This page was moved from the Toolserver wiki.
Toolserver has been replaced by Toolforge. As such, the instructions here may no longer work, but may still be of historical interest.
Please help by updating examples, links, template links, etc. If a page is still relevant, move it to a normal title and leave a redirect.

Category:Tools

Manual on MediaWiki Tools
Lang Metadata
Release status: unknown
Author(s) Hippietrail
License No license specified
Download No link
https://toolserver.org/~hippietrail/langmetadata.fcgi

Category:Tools by Hippietrail


Lang metadata returns JSON data containing various kinds of data about many languages compiled from various sources including ISO, WikiMedia, as well as hard-coded data.

It is primarily used by the GUI translation editor on the English Wiktionary to display only parts of the input form relevant to the given language so as to reduce clutter. It is also used by hippiebot in IRC #wiktionary .

Without any parameters it will return all data for all languages so be careful!

To request specific fields only use the fields parameter.

Currently supported data fields are:

  • iso3 ISO 639-code (3 letters)
  • iso2b ISO 639-2 bibliographic code (3 letters)
  • iso2t ISO 639-2 terminology code (3 letters)
  • iso1 ISO 639-1 code (2 letters)
  • isoscope ISO 639-2 scope
  • isotype ISO 639-2 type
  • isoname the language name in English according to ISO 639
  • wm whether this code is used for WikiMedia projects
  • hw whether this code has a Wiktionary project
  • nn the native name(s) for this code according to WikiMedia
  • sc the ISO script code(s) used by this language, currently or formerly
  • wsc the script template used by this language on the English Wiktionary
  • g which genders, if any, exist for nouns in this language
  • p whether this language has a distinction between singular and plural for nouns
  • alt whether this language uses optional diacritic or vowel marks such as Latin macrons or Hebrew vowel points
  • n hard-coded name(s) for this language in English
  • anc whether this is an ancient language
  • fam the best fitting ISO language family code
  • geo ISO region codes for which areas in which this language is the national, native, official, major, etc language
  • altmapfrom used for removing optional diacritic and vowel marks
  • altmapto used for removing optional diacritic and vowel marks
  • altmapstrip used for removing optional diacritic and vowel marks

To request specific languages only use the langs parameter. Currently only language codes are accepted including WikiMedia and English Wiktionary extensions to ISO 639.


Example: http://toolserver.org/~hippietrail/langmetadata.fcgi?format=jsonfm&langs=eo,es,fr-gal,zh-min-nan