diff --git a/config.lua b/config.lua index f890043..afd41fe 100644 --- a/config.lua +++ b/config.lua @@ -1,6 +1,6 @@ Config = {} -Config.UISetting = { +Config.Settings = { locale = {} } @@ -21,3 +21,11 @@ Config.Nui = false Config.Dev = false Config.Framework = "custom" -- "qb" | "esx" | "custom" Config.ClientLazyLoad = false + +function L(key, ...) + if Config.Settings.locale[key] then + return string.format(Config.Settings.locale[key], ...) + else + return key + end +end diff --git a/main.lua b/main.lua index 96dadbc..431be57 100644 --- a/main.lua +++ b/main.lua @@ -20,7 +20,7 @@ if IsDuplicityVersion() then end else RegisterNUICallback('AppReady', function(data, cb) - cb(Config.UISetting or {}) + cb(Config.Settings or {}) NuiReady = true end) end