local en = require("lang.en") local function get(...) local path local node = en local function f(...) for _, comp in ipairs({...}) do path = (path and (path .. ".") or "") .. comp for x in comp:gmatch("[^%.]+") do if type(node) == "table" then node = node[x] else return end end end end f(...) if type(node) == "string" then return node else return path or "" end end -- ipairs({...}) return { get = get }