European colonialism began in mainland Tanzania during the late 19th century when Germany formed German East Africa, which gave way to British rule following World War I. The mainland was governed as Tanganyika, with the Zanzibar Archipelago remaining a separate colonial jurisdiction. Following their respective independence in 1961 and 1963, the two entities merged in April 1964 to form the United Republic of Tanzania.
Over 100 different languages are spoken in Tanzania, making it the most linguistically diverse country in East Africa. The country does not have a de jure official language, although the national language is Swahili. Swahili is used in parliamentary debate, in the lower courts, and as a medium of instruction in primary school. English is used in foreign trade, in diplomacy, in higher courts, and as a medium of instruction in secondary and higher education, although the Tanzanian government is planning to discontinue English as a language of instruction altogether. Approximately 10 percent of Tanzanians speak Swahili as a first language, and up to 90 percent speak it as a second language.
The name "Tanganyika" is derived from the Swahili words tanga ("sail") and nyika ("uninhabited plain", "wilderness"), creating the phrase "sail in the wilderness". It is sometimes understood as a reference to Lake Tanganyika.
The name of Zanzibar comes from "zenji", the name for a local people (said to mean "black"), and the Arabic word "barr", which means coast or shore.