--[[ C#中 Localization 根据CN、EN.txt动态生成 ]] local Const_IDS = { } local base = { __index = function(t, k) local v = nil if k then v = (k == "") and 0 or rawget(t, k) end if v == nil then logging.error(LTAG.ERROR, "IDS not found", k) end return v end, __newindex = function() error("Attempt to modify read-only table") end } if USE_LUA_STANDALONE then base = { __index = function(t, k) return "" end, __newindex = function() error("Attempt to modify read-only table") end } else local GetLocalizedTxt = UIUtils.GetLocalizedTxt local SetLabelText = UIUtils.SetLabelText UIUtils.GetLocalizedTxt = function(ids) if ids then return GetLocalizedTxt(ids) end end UIUtils.SetLabelText = function(localizationText, ids) if ids then SetLabelText(localizationText, ids) end end end return setmetatable(Const_IDS, base)