Global("localization", "eng")
-- AO game Localization detection new conceptual detection by Ciuine, aesthetically improved by Ramirez.
local function GetGameLocalization()
	local id = options.GetOptionsByCustomType( "interface_option_localization" )[ 0 ]
	if id then
		local values = options.GetOptionInfo( id ).values
		local value = values and values[ 0 ]
		local name = value and value.name
  
		if name then
			return string.sub(userMods.FromWString( name ),1,3)
		end
		return "eng"
	end
end
-----------------------------------
localization = GetGameLocalization()
function GetTextLocalized( strTextName )
	return Locales[ localization ][ strTextName ] or Locales[ "eng" ][ strTextName ]
end

function toWS( arg )
	return userMods.ToWString(arg)
end

function fromWS( arg )
	return userMods.FromWString(arg)
end

