When people choose a new language to learn, they don’t generally pick the one that everyone around them already speaks. Germans don’t typically decide to double-down on their German. Danes don’t usually need to study Danish. Or so you’d think.

Yet many users of Duolingo are doing just that. While most still use the popular educational app to study languages of foreign countries, millions are using it to study local languages, according to company data. One-quarter of Duolingo’s users in Sweden are studying Swedish, for example. And over 9 million users in the US are learning English.

Here are the percentages of app users studying the official language of the country they live in:

It turns out that the countries with the world’s highest proportion of official-language learners are mostly in Northern Europe and sub-Saharan Africa. These are two very different parts of the world. They rarely appear together in charts of just about anything. One is wealthy and linguistically homogeneous. The other is relatively poor and home to huge varieties of languages. So why would they both be so high on this measure?

For the rich countries of Northern Europe, high levels of migration are likely contributing to the trend of people studying official languages. Across Europe, countries where migrants make up a high percentage of the population tend to have more people learning the local language through Duolingo. It looks like the high numbers here indicate new arrivals trying to assimilate into their new home.

That could also help explain why, for example, less than 1% of Duolingo users in Venezuela are learning its official language, Spanish. Outsiders are not traveling there, as the country slogs through hyperinflation and economic crisis.

A different process seems to be going on in sub-Saharan Africa. Unlike Denmark, Norway, or Sweden, countries in this region are linguistically diverse. In Denmark, there is a 91% chance that two random people will share a mother tongue, according to the linguistic diversity index. For Liberians, who speak many different languages, the likelihood of running into a compatriot who speaks the same language is just 8%. In this case, Duolingo could be helping locals to learn an official national language that unites a huge variety of internal communities.