This question already has an answer here:
When did infantrymen of Western armies cease to be issued of swords as sidearms (and backup weapons), on a general basis?
PS, Swords were rather common stuff for infantrymen even in 19th century (the briquets). See, for instance: this website. I recently saw (at the NYC Frick Collection) a video titled "Watteau Soldiers", whose pictures are easy to find. That artist clearly depicted (ordinary private) infantrymen carrying both bayonets and swords hanging from their belts.