Slovenia, officially the Republic of Slovenia, is a country in Central Europe. Formed in 1991, Slovenia borders Italy to the west, Austria to the north, Hungary to the northeast, and Croatia to the south and southeast; its southwestern boundary consists of a 46.6 km coastline on the Adriatic Sea. Slovenia is mostly mountainous and forested, covers 20,271 square kilometres (7,827 sq mi), and has a population of approximately 2.1 million people. Slovene is the official language. Slovenia has a predominantly temperate continental climate, with the exception of the Slovene Littoral and the Julian Alps. Ljubljana, the capital and largest city of Slovenia, is geographically situated near the centre of the country. Other larger urban centers include Maribor, Ptuj, Kranj, Celje, and Koper.
Slovenia's territory has been part of many different states, including the Byzantine Empire, the Carolingian Empire, the Holy Roman Empire, the Kingdom of Hungary, the Republic of Venice, the Illyrian Provinces of Napoleon's First French Empire and the Habsburg Empire. The Kingdom of Serbs, Croats, and Slovenes was formed in December 1918; in 1929, the Kingdom became known as Yugoslavia. In 1946, after World War II, Slovenia was established as one of six republics that made up the socialist federation of Yugoslavia. In June 1991, Slovenia declared independence from Yugoslavia and became an independent sovereign state.