French was a minority language in France until the 20th century. The other languages were basically beaten and shamed out of school children.
Same situation with Italian.
The introduction of the radio and the television played a big part in the shift to Italian and French becoming the normal languages for their respective countries over the multitude of regional languages.
I really enjoy that Napolitan and Sicilian dialects are kind of still being spoken.
Sicilian is still spoken a bit in the New York Metro area - a lot of New Jersey Italians that speak fluent Italian have trouble communicating with people in Italy, because it's Sicilian!
Fortunately for french children that currently aren't forced to learn five dialects to communicate the same thing in five different french cities. The opposite way is leading to a few very bizarre and unfair situations.
It's not exactly the same situation as Mandarin, the French dialects have generally not much to do with each other, it's not really a family of languages like Chinese.