You can easily mod it so anybody who possesses Sparta can build spartans. Just add the factions to the build line in export descr building txt file. The unit card will be a peasant untill you add the right card to the different factions though. If the phalanxes you're referring to are General's units they can't. The Rally function uses that button.