Complex sentence: In the 7th century it was part of the Principality of Karantania, and was part of the empire of Charlemagne from 788 to 843, when it became part of the eastern Frankish kingdom of Louis the German.
Split into simpler sentences: In the 7th century it was part of the Principality of Karantania. It was part of the empire of Charlemagne from 788 to 843, when it became part of the eastern Frankish kingdom of Louis the German.