Al-Kashgari studied the Turkic languages of his time and in Baghdad, he compiled the first comprehensive dictionary of Turkic languages, the (English: "Compendium of the languages of the Turks") in 1072–74. It was intended for use by the
Abbasid Caliphate, the new
Arab allies of the Turks. Mahmud Kashgari's comprehensive dictionary, later edited by the Turkish historian,
Ali Amiri, contains specimens of old Turkic poetry in the typical form of
quatrains (
Persio-
Arabic , ''
rubā'iyāt''; ), representing all the principal genres:
epic,
pastoral,
didactic,
lyric and
elegiac. His book also included the first known map of the areas inhabited by
Turkic peoples. This map is housed at the National Library in Istanbul.
Dīwān Lughāt al-Turk also contains linguistic data about multiple Turkic dialects that may have been gathered from merchants and others involved in trade along routes that travelled through
Transoxiana. The origin of the compiled information is not known. Scholars believe it is likely that Kashgari would have gathered most of the content about Oguz-Turkmen from Oguz tribes in
Khorasan since he himself was a student in Seljuk Baghdad, but it is possible that some of this material could have come from early Turkmen. Other scholars believe that the compendium was based on the Turkiyya language of the
Chigil tribe in the
Kara-Khanid confederation. However, scholars have not yet come to a settled conclusion. Al-Kashgari advocated
monolingualism and the
linguistic purism of the Turkic languages and held a belief in the superiority of
nomadic people (the Turkic tribes had traditionally been nomads) over urban populations. Most of his Turkic-speaking contemporaries were bilingual in
New Persian, which was then the urban and literary language of Central Asia. Even so, Kashgari praised the dialect spoken by the bilingual
Uyghurs as "pure" and "most correct" on par with those of Turkic monolinguals. Al-Kashgari cautioned against the assimilation of the nomadic way of life into a sedentary culture. He recorded a Turkic proverb that warned, “Just as the effectiveness of a warrior is diminished when his sword begins to rust, so too does the flesh of a Turk begin to rot when he assumes the lifestyle of an Iranian.” ==Death==