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