First of all, D&D 5 treats language as a binary - you know it with absolute fluency or you don't know it at all. You could stop right there and it would be fair.
If you want to go further and allow someone to recognise a written or spoken language they don't know you need to decide:
- The applicable stat - Intelligence is a clear stand out
- The applicable proficiency, if any - we'll come back to that
- The DC - clearly this should be based on how prevalent the language is in your game world; I'm not giving any advice on that but guidelines are in the book, they go from easy to damn near impossible
Which proficiency is appropriate?
Whatever one the player can make a reasonable case for
Depending on the language, I can see a case for:
However, I'm not the lawyer for the prosecution; it's not up to me to convince you. Let the player state their case: if they convince you it applies, if they don't it doesn't.