equal
deleted
inserted
replaced
1 -- Library for localizing strings in lua scripts |
1 -- Library for localizing strings in lua scripts |
2 |
2 |
3 local lang = HedgewarsScriptLoad("Locale/" .. tostring(LOCALE) .. ".lua") |
3 if LOCALE ~= "en" then |
|
4 HedgewarsScriptLoad("Locale/" .. tostring(LOCALE) .. ".lua") |
|
5 end |
4 |
6 |
5 function loc(text) |
7 function loc(text) |
6 if locale ~= nil and locale[text] ~= nil then return locale[text] |
8 if locale ~= nil and locale[text] ~= nil then return locale[text] |
7 else return text |
9 else return text |
8 end |
10 end |