To clarify, I’m asking about the Old Swiss Confederacy within the Holy Roman Empire, not later 19th / 20th century nationalism - hence the scare quotes around “language”.
Follow up question. There were and still are French and Italian dialects in Switzerland. However, French and Italian cantons largely switched to standard versions of those languages with some differences and abandoned the dialects in every day speech. How come this did not happen to German cantons?