The B[e] phenomenon in the Milky Way and Magellanic Clouds