Dialects of Serbo-Croatian
Kajkavian is spoken in North Croatia, including the capital Zagreb, as well as in a few enclaves in Austria, Hungary, and Romania. Though its speakers are ethnic Croats and Kajkavian is thus generally considered a dialect of Serbo-Croatian, it is closer to neighboring Slovene than it is to Chakavian or Shtokavian. The Kajkavian area of Croatia is bordered on the northwest by Slovene language territory. It is bordered on the east and southeast by Shtokavian dialects roughly along a line that was the former division between Civil Croatia and the Habsburg Military Frontier; in southwest along Kupa and Dobra rivers, it persisted in ancient (medieval) contact with Chakavian dialects.
Shtokavian
Croatian has had a long tradition of Shtokavian vernacular literacy and literature. It took almost four and half centuries for Shtokavian to prevail as the dialectal basis for the Croatian standard. In other periods, Chakavian and Kajkavian dialects, as well as hybrid Chakavian–Kajkavian–Shtokavian interdialects "contended" for the Croatian national koine – but eventually lost, mainly due to historical and political reasons. By the 1650s it was fairly obvious that Shtokavian would become the dialectal basis for the Croatian standard, but this process was finally completed in the 1850s, when Neo-Shtokavian Ijekavian, based mainly on Ragusan (Dubrovnik), Dalmatian, Bosnian, and Slavonian literary heritage became the national standard language.