|
|
Line 1: |
Line 1: |
| local export = {} | | local export = {} |
|
| |
| export.languages = {
| |
| -- Proto-Laenkean
| |
| ["lnk-pro"] = {name = "Proto-Laenkean", code = "lnk-pro", link = ":Category:Proto-Laenkean roots", proto = true},
| |
| -- Balavic
| |
| ["bal"] = {name = "Balavic", code = "bal", link = ":Category:Balavic lemmas", proto = false},
| |
| -- Kilitic
| |
| ["kil"] = {name = "Kilitic", code = "kil", link = ":Category:Kilitic lemmas", proto = false},
| |
| -- Laefevian
| |
| ["lfv-pro"] = {name = "Proto-Laefevic", code = "lfv-pro", link = ":Category:Proto-Laefevic lemmas", proto = true},
| |
| ["lfv-o"] = {name = "Old Laefevian", code = "lfv-o", link = ":Category:Old Laefevian lemmas", proto = false},
| |
| ["lfv-m"] = {name = "Middle Laefevian", code = "lfv-m", link = ":Category:Middle Laefevian lemmas", proto = false},
| |
| ["lfv"] = {name = "Laefevian", code = "lfv", link = ":Category:Laefevian lemmas", proto = false},
| |
| -- Radestrian
| |
| ["rad-pro"] = {name = "Proto-Radic", code = "rad-pro", link = ":Category:Proto-Radic lemmas", proto = true},
| |
| ["rad-o"] = {name = "Old Radestrian", code = "rad-o", link = ":Category:Old Radestrian lemmas", proto = false},
| |
| ["rad-m"] = {name = "Middle Radestrian", code = "rad-m", link = ":Category:Middle Radestrian lemmas", proto = false},
| |
| ["rad"] = {name = "Radestrian", code = "rad", link = ":Category:Radestrian lemmas", proto = false},
| |
| -- Riyan
| |
| ["ryn-o"] = {name = "Old Riyan", code = "ryn-o", link = ":Category:Old Riyan lemmas", proto = false},
| |
| ["ryn-m"] = {name = "Middle Riyan", code = "ryn-m", link = ":Category:Middle Riyan lemmas", proto = false},
| |
| ["ryn"] = {name = "Riyan", code = "ryn", link = ":Category:Riyan lemmas", proto = false}
| |
| }
| |
|
| |
|
| function export.get_by_code(code) | | function export.get_by_code(code) |
Line 28: |
Line 5: |
| error("Language code must be string. Got " .. type(code)) | | error("Language code must be string. Got " .. type(code)) |
| end | | end |
| local l = export.languages[code] | | local l = require("Module:languages/data")[code] |
| if l == nil then | | if l == nil then |
| error("No such language code") | | error("No such language code") |