Critics say the legislation is similar to Russia’s ban on “gay propaganda” targeting minors.