Complex sentence: When Britain colonized the region in the 18th century, Magelang became the seat of government and after the Napoleonic wars ended, the English turned Java back over to the Dutch in 1816 and Magelang continued to play a central role in the Dutch East Indies.
Split into simpler sentences: When Britain colonized the region in the 18th century, Magelang became the seat of government. After the Napoleonic wars ended, the English turned Java back over to the Dutch in 1816 and Magelang continued to play a central role in the Dutch East Indies.