From a1d517b09acc73d609eeaa5b2e77936305db9c14 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 9 Nov 2009 11:09:12 -0800 Subject: Adding slightly better locale detection. --- lua-interface-light.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua-interface-light.lua') diff --git a/lua-interface-light.lua b/lua-interface-light.lua index 0aaa762..ec0694d 100644 --- a/lua-interface-light.lua +++ b/lua-interface-light.lua @@ -4,8 +4,7 @@ loadmodule "luahandle" local equivalent_locales = { ["French"] = "frFR", ["FranÃais"] = "frFR", - ["fr_FR"] = "frFR", - ["fr_BE"] = "frFR", + ["fr"] = "frFR", } local invite_locale = { @@ -57,6 +56,7 @@ local function generate_dlg() local invite = invite_locale.default system_locale = iup.GetGlobal "SYSTEMLANGUAGE" if type(system_locale) == "string" then + system_locale = split(split(system_locale, "_")[1], " ")[1] local direct = invite_locale[system_locale] if direct then invite = direct -- cgit v1.2.3