According to the Constitution of Singapore, the four official languages of Singapore are Malay, Mandarin, Tamil, and English, while the national language is Malay. The three languages other than English were chosen to correspond with the major ethnic groups present in Singapore at the time: Mandarin had gained status since the introduction of Chinese-medium schools; Malay was deemed the "most obvious choice" for the Malay community; and Tamil for the largest Indian ethnic group in Singapore, in addition to being "the language with the longest history of education in Malaysia and Singapore". In 2009, more than 20 languages were identified as being spoken in Singapore, reflecting a rich linguistic diversity in the city. Singapore's historical roots as a trading settlement gave rise to an influx of foreign traders, and their languages were slowly embedded in Singapore's modern day linguistic repertoire.
In the early years, the lingua franca of the island was Bazaar Malay (Melayu Pasar), a creole of Malay and Chinese, the language of trade in the Malay Archipelago. While it continues to be used among many on the island, especially Singaporean Malays, Malay has now been displaced by English. English became the lingua franca due to British rule of Singapore, and was made the main language upon Singaporean independence. Thus, English is the medium of instruction in schools, and is also the main language used in formal settings such as in government departments and the courts.
Hokkien briefly emerged as a lingua franca among the Chinese, but by the late 20th century it had been eclipsed by Mandarin. The Government promotes Mandarin among Singaporean Chinese, since it views the language as a bridge between Singapore's diverse non-Mandarin speaking groups, and as a tool for forging a common Chinese cultural identity. China's economic rise in the 21st century has also encouraged a greater use of Mandarin. Other Chinese varieties such as Hokkien, Teochew, Hakka, Hainanese and Cantonese have been classified by the Government as "dialects", and language policies and changes in language attitudes based on this classification have led to a decrease in the number of speakers of these varieties. While Tamil is one of Singapore's official languages, other Indian languages are also frequently used.