The French got the right idea much earlier than other major nations, decriminalizing homosexuality in 1791.
The legalization of homosexual acts between two consenting adults came as part of the French Penal Code of 1791, during the French Revolution. The code was sponsored by French politican Louis-Michel le Peletier, who presented the code as a clear guide to crimes and their respective punishments. It was a major shift in legal procedure, taking power away from judges and instead outlining explicitly what a crime’s repercussions were. The code was also notable in that it did not adhere to a strict Christian doctrine and legalized sodomy.
Other European nations would drag their feet to catch up to France’s liberal legislation. England didn’t pass the Sexual Offences Bill until 1967, and even then, homosexuality only became legal when in “private,” between two men over the age of 21. More than two men was still considered illegal, as was engaging in sexual acts in a hotel. The bill did not extend to Scotland or some other parts of the UK, and was not ammended to fully legalize homosexuality until 2000.
Spain decriminalized homosexuality in 1979, and Italy in 1887.