Are there any cases where two varieties of the same language are treated as separate languages, or where two distinct languages are treated as varieties of the same language. If so, why?
You're using the words "language" and "dialect" as if they were mutually exclusive: as if some people spoke "languages" and other people spoke mere "dialects." But that's not how linguists use those words. Think of them instead as referring to two different levels on the same hierarchy.
- Everyone speaks a language.
- Everyone speaks a dialect (or "variety"*) of whatever language they speak.
For instance, I speak the Midland US dialect of English. Asking whether I speak a dialect or a language is like asking whether I was born in Michigan or in the United States. The answer is "both," because one includes the other. Saying "I don't speak a dialect, I just speak proper English" would be like saying "I don't live in a state or territory or in Washington D.C., I just live in the US," which is pretty much nonsense.
So maybe it makes sense to rephrase your questions, like so:
- Are there any cases where two varieties of the same language are treated as separate languages for political reasons?
- Are there any cases where two distinct languages are treated as varieties of the same language for political reasons?
In both cases the answer is "yes." For #1, look at Serbian, Croatian and Bosnian. Most linguists consider these all to be local varieties of the Serbo-Croatian language, but native speakers will insist that they're different languages. For #2, look at the language situation in China, where for instance Mandarin and Cantonese are treated as varieties of the same language even though they're distinct languages by any non-political standard.
*Most linguists wouldn't consider "dialect" to be derogatory. But in non-technical talk, it is often used derogatorily — as in "That's not a real language, it's just a dialect." So I like to use the word "variety" just because it makes it clear that I don't have any derogatory meaning in mind. That's just a personal preference, though, and as far as I'm concerned if you want to say "dialect" that's fine too.
"A language is a dialect with an army and navy" (a famous saying)
Actually a dialect CAN become a language as has been seen in France and in Spain. By decree of their then ruling class, the ruling class´particular dialect was enforced as the national language. As someone once said: a language is just a dialect with an army to make it stick. But, to address the original question: Moldavan and Romanian are basically the same language, divided by state borders, difference in script and former Soviet policy of autonomous member states in the Union. In modern day, either side of the border considers the other country to speak just a dialect of Romanian. So, here the distinction between language and dialect is merely political/nationalistic. As has already been pointed out above,many languages are just continua within a language family