Easy. By learning and studying language patterns.
Because <span>Algeria had a large settler community made up of French-speaking Europeans.</span>
English, Chinese, French, Japanese, are a few that come to mind, If you are talking about Imperialistic Great Britian and France during the Age of Imperialism. I'm not sure about all of those other ones, except Latin was I'm sure dead around that age.