Complex sentence: In the 7th century it was part of the Principality of Carantania and the empire of Charlemagne from 788 to 843, when it became part of the eastern Frankish kingdom of King Louis the German.
Split into simpler sentences: In the 7th century it was part of the Principality of Carantania. 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.