-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLocal.lua
More file actions
39 lines (31 loc) · 940 Bytes
/
Local.lua
File metadata and controls
39 lines (31 loc) · 940 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- ===========================================================================
-- file: Local
-- author: Hardballer
--
-- Load locals data
-- ===========================================================================
local Console = require("Core/Console");
local Util = require("Core/Util");
local languages = {
"CZ", "DE", "EN", "ES", "FR",
"IT", "PL", "RU", "TR"
} --: vector<string>
local language = nil --: string
local file = io.open("data/language.txt");
if file then
local str = file:read();
if Util.indexOf(languages, str) > -1 then
language = str;
else
language = "EN";
end
Console.log("Language set to "..language, "Local");
else
language = "EN";
Console.log("No language.txt found, default to EN", "Local");
end
local path = "Local/"..language.."/"..cm.name.."/";
--# assume path: "Local/EN/main_attila/"
return {
RegionsName = require(path.."/RegionsName");
}