Many Middle Turkic works were written in these languages. The language of the Kara-Khanid Khanate was known as Turki, Ferghani, Kashgari or Khaqani. The language of the Chagatai Khanate was the Chagatai language.