WINNING 38 Emmy awards is a good measure of success. “Game of Thrones” garnered that many for its portrayal of a world of sex, violence and politics. Westeros and Essos seem so real that some viewers could imagine moving there. Part of that detail has been the creation of the richest linguistic universe since J.R.R. Tolkien’s Middle Earth.

Tolkien was a linguistic obsessive who spoke Greek, Latin, Anglo-Saxon and Gothic as a child and went on to study many other tongues. He started inventing languages in his teens, and said he created Middle Earth to help this, not the other way round. The most developed were two forms of Elvish, called Quenya and Sindarin. Tolkien gave Sindarin the same kinds of historical sound changes that had produced the European languages he loved: cw-sounds became p-sounds in Sindarin, just as had happened in the early history of Welsh. He riffled through Old Norse and Old English for inspiration, and Finnish was a particular favourite.

In the field of language-creation for fictional worlds, there is Tolkien, and there is everybody else. But David Peterson, the language-smith of “Game of Thrones”, comes a close second for the amount of thought put into its two languages, Dothraki and Valyrian. The interest in these tongues is such that Living Language, a respected language-textbook publisher, has already produced a volume for learning Dothraki, while Duolingo, a popular online language-learning platform, now offers a course in High Valyrian.

In his book Mr Peterson describes his bafflement at the fictional languages of his youth. The “Star Wars” films featured foreign “languages” that were nothing more than a series of weird sounds. He wondered how on the planet of Tatooine the bounty hunter in “Return of the Jedi” could express “50,000—no less” as yotó yotó. Decades later, with a master’s degree in linguistics, he made Dothraki and Valyrian as rich and realistic as possible, a process he describes in his book “The Art of Language Invention”, which was published in 2015.

Creating words is the easy part; anyone can string together nonsense syllables. But Mr Peterson, like Tolkien, took the trouble to give his words etymologies and cousins, so that the word for “feud” is related to the words “blood” and “fight”. To make the languages pronounceable but clearly foreign, he put non-English sounds in high-frequency words (like khaleesi, or queen), put the stress in typically non-English places, and had words begin with combinations of sounds that are impossible in English, like hr.

Armed with a knowledge of common linguistic sound changes, he gives his languages the kinds of irregularities and disorder that arise in the real world. High Valyrian is a classical language with daughter languages. Mr Peterson took Latin’s evolution into the Romance languages as an inspiration. Consonants soften from stops (where the airflow is blocked completely) to fricatives (where the air is merely slowed in the mouth). So b becomes v, g becomes a gurgled gh, and so on: High Valyrian’s obar (“curve”) becomes Astapori Valyrian’s uvor. Words’ meanings—as in real life—drift, too, giving the system more realistic messiness.

The writers also deserve credit for storylines in which language plays a prominent role. Dothraki is the guttural language of a horse-borne warrior nation, but high-born Daenerys Targaryen does not look down on it; methodically learning it is key to her rise. She also skillfully conceals her knowledge of the language when it proves useful. Tyrion Lannister is left to administer the city of Mereen despite his ropy command of Valyrian, leading to some comic moments. And a prophecy of a future hero is revealed to have new meaning when an interpreter explains that the word in question is ambiguous in Valyrian—it could be “prince” or “princess”.

It might seem odd that a highly sexist society like the one of “Game of Thrones” would have languages where sex roles were not clearly marked: what, only one word for “prince” and “princess” when women are almost always barred from the throne? But Mr Peterson is good on this in his book. Languages are not always (or even usually) perfect and efficient vehicles for a culture; random change can leave them with too many words for one concept, and not enough for another. In this way, the flawed nature of language reflects the foibles of flawed humans and the imperfect worlds they strive to create.