Translation:Can you speak Chinese?
I found this answer to your question:
"Currently 中文 and 汉语 have the same meaning, we distinguish them only because of some wording is more preferred. [..] A dictionary is called 现代汉语词典 but not 现代中文词典. If you say 这是一本中文书, I will consider this is a book written in Chinese; if 这是一本汉语书, then I will personally by default consider it's a textbook for learning Chinese. Except those conventional phrases, you don't have to focus on the distinction between them."
汉语 represents the language of the majority in China, the language of Han people. While 中文 means something like the language spoken in China. It is something like, every people in China speaks 中国 but not everyone speaks 汉语. I might misinterpreted this, but as far as I know, this is the difference.
Actually, Duolingo looked 会 as the character that is used in the sense of knowing how-to, which is how such meaning of the sentence has its forms.
However, it is also correct to substitute 会 with 能 to express "capability", since this can also plays the role. The sentence is 你能說中文嗎？, which suggests "Are you able to speak Chinese?" Meaning equivalent: "Can you speak Chinese?"