Instead Mycroft goes on to say that it "took him a few hours" to learn it. And that was what Scalzi would call a "flying snowman" to me; it just stretched my suspension of disbelief beyond its breaking point. If I remember, a full language has 100,000 words or so with maybe 20,000 in common use. Mycroft says it's a Slavic language, and he probably knew another Slavic language, like Russian.
But Mycroft needed to learn to speak the language as well as a native in order to fool the other guards. So he'd have to know every single difference about how any word is used. A few hours -- say four -- is 14,400 seconds. So he'd have to learn more than one word a second, not counting grammar and pronunciation, which again would have to be perfect if he's going to convince the other guard he's actually Serbian.
This crosses the line to me from utter brilliance to supernatural. And it's foundational to the universe that Sherlock's (and by extension Mycroft's) abilities must be nearly unbelievable but in the end natural. Why couldn't he have just said, "It took me a whole week?"