summaryrefslogtreecommitdiff
path: root/xmake/core/language/language.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/language/language.lua')
-rw-r--r--xmake/core/language/language.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/xmake/core/language/language.lua b/xmake/core/language/language.lua
index 2b3e9d813..4815d47db 100644
--- a/xmake/core/language/language.lua
+++ b/xmake/core/language/language.lua
@@ -260,10 +260,12 @@ function language.load(name)
-- load all languages
if not name then
- for _, name in ipairs(table.wrap(os.match(path.join(language._directory(), "*"), true))) do
- local instance, errors = language.load(path.basename(name))
- if not instance then
- return nil, errors
+ if not language._LANGUAGES then
+ for _, name in ipairs(table.wrap(os.match(path.join(language._directory(), "*"), true))) do
+ local instance, errors = language.load(path.basename(name))
+ if not instance then
+ return nil, errors
+ end
end
end
return language._LANGUAGES