--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/Android-build/SDL-android-project/assets/Data/Scripts/Locale.lua Sat Aug 18 18:11:04 2012 +0200
@@ -0,0 +1,18 @@
+-- Library for localizing strings in lua scripts
+
+local lang = loadfile(GetUserDataPath() .. "Locale/" .. tostring(L) .. ".lua")
+
+if lang ~= nil then
+ lang()
+else
+ lang = loadfile(GetDataPath() .. "Locale/" .. tostring(L) .. ".lua")
+ if lang ~= nil then
+ lang()
+ end
+end
+
+function loc(text)
+ if lang ~= nil and locale ~= nil and locale[text] ~= nil then return locale[text]
+ else return text
+ end
+end