diff options
Diffstat (limited to 'server/src/language.lua')
-rw-r--r-- | server/src/language.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/src/language.lua b/server/src/language.lua index 69c4272f..da25a0b8 100644 --- a/server/src/language.lua +++ b/server/src/language.lua @@ -14,8 +14,7 @@ local function osLanguage() return '' end -local function init() - local id = osLanguage() +local function getLanguage(id) local support = supportLanguage() -- 检查是否支持语言 if support[id] then @@ -31,4 +30,12 @@ local function init() return 'enUS' end +local function init() + local id = osLanguage() + local language = getLanguage(id) + log.info(('Os language: %s'):format(id)) + log.info(('Used language: %s'):format(language)) + return language +end + return init() |