Debian Codegraph @

texmf-dist/tex/luatex/luavlna/luavlna-csplain-langs.lua

raw
1 local languages = {}
2 local function parse_language_lan(content)
3 for name, id in content:gmatch("preplang%s+.-%s+(.-)%s+.-%s(.-)%s+") do
4 -- skip invalid languages
5 if not name:match("%#") then
6 languages[name] = id
7 end
8 end
9 end
10
11 local langfile = kpse.find_file("lua-hyphen.lan")
12 if langfile then
13 local f = io.open(langfile, "r")
14 local content = f:read("*all")
15 parse_language_lan(content)
16 f:close()
17 end
18
19
20 return languages
21