diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-07 14:26:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-07 14:26:02 +0800 |
commit | 67f7c1740ef7d0880224b099d3ccc9530d75c14a (patch) | |
tree | 7c4685f7f93f9d54e1f62281ad05afc69b723bbc /server | |
parent | 158ac28bae11f8528b22bd910eb791991928901a (diff) | |
download | lua-language-server-67f7c1740ef7d0880224b099d3ccc9530d75c14a.zip |
打个日志
Diffstat (limited to 'server')
-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() |