History of Standard Chinese
Mandarin, officially Standard Chinese, is an official language used by the People's Republic of China. Taiwanese Mandarin is used by the Republic of China (Taiwan). Standard Singaporean Mandarin is used by Singapore. Before Mandarin. Since ancient history, the Chinese language has always consisted of a wide variety of dialects; hence prestige dialects and linguae francae have always been needed. Confucius, for example, used "yǎyán" (雅言), or "elegant speech", rather than colloquial regional dialects; text during the Han dynasty also referred to "tōngyǔ" (通語), or "common language". Rime dictionaries, which were written since the Southern and  Northern Dynasties, may also have reflected one or more systems of standard pronunciation during those times. However, all of these standard dialects were probably unknown outside the educated elite; even among the elite, pronunciations may have been very different, as the unifying factor of all Chinese dialects, Classical Chinese, was a written standard, not a spoken one. Adoption of Mandarin. The Ming (1368–1644) and Qing dynasties (1644–1912) began to use the term "guānhuà" (官話), or "official speech", to refer to the speech used at the courts. It seems that during the early part of this period, the standard was based  on the Nanjing dialect, but later the Beijing dialect became increasingly influential, despite the mix of officials and commoners speaking various dialects in the capital, Beijing. The existence of "Guanhua" became known to Europeans already by the time of Matteo Ricci (who worked in China in 1582-1610), who wrote of "a spoken language common to the whole Empire, known as the Quonhua, an official language for civil and forensic use". In the 17th century, the Empire had set up Orthoepy Academies (正音書院, Zhèngyīn Shūyuàn) in an attempt to make pronunciation conform to the Beijing standard. But these attempts had  little success. As late as the 19th century the emperor had difficulty understanding some of his own ministers in court, who did not always try to follow any standard pronunciation. As late as the early 20th century, the position of Nanjing Mandarin was considered higher than that of Beijing by some and the postal romanization standard set in 1906 included spellings with elements of Nanjing pronunciation. Nevertheless, by 1909, the dying Qing dynasty had established the Beijing dialect as "guóyǔ" (国语/國語), or the "national language". After the Republic of China was established in 1912, there was more success in  promoting a common national language. A Commission on the Unification of Pronunciation was convened with delegates from the entire country, who were chosen based as often on political considerations as often as on linguistic expertise. The conference deadlocked between promoters of northern and southern pronunciation standards and as a result, a compromise was produced. The "Dictionary of National Pronunciation" (國音詞典) was published, which was based on the Beijing dialect, but with added features, such as a fifth tone, believed to be more faithful to historical Chinese pronunciation. Meanwhile, colloquial literature continued to develop apace vernacular Chinese, despite the lack of  a standardized pronunciation. Gradually, the members of the National Language Commission came to settle upon the Beijing dialect which became the major source of standard national pronunciation, due to the status of that dialect as a prestigious dialect. In 1932, the commission published the "Vocabulary of National Pronunciation for Everyday Use" (國音常用. 字彙), with little fanfare or official pronunciation. This dictionary was similar to the previous published one, now known as the Old National Pronunciation (老國音), except that it normalized the pronunciations for all characters into the pronunciation of the Beijing dialect. Despite efforts by some factions to recognize and  promote southern Chinese varieties as well, the Kuomintang strongly promoted Guoyu as the one national language and censored and arrested opponents of this movement, continuing this through the wartime years. Elements from other dialects continue to exist in the standard language, but as exceptions rather than the rule. The government of the People's Republic of China, established in 1949, continued the effort. In 1955, "guóyǔ" was renamed "pǔtōnghuà" (普通話), or "common speech". (The name change was not recognized by the Republic of China, which has governed only Taiwan and some surrounding islands since 1949.) Since then, the standards used  in mainland China and Taiwan have diverged somewhat, though they continue to remain essentially identical. After the handovers of Hong Kong and Macau, the term "Putonghua" is used in those special administrative regions of China and pinyin is widely used for teaching of Putonghua. In both mainland China and Taiwan, the use of Mandarin as the medium of instruction in the educational system and in the media has contributed to the spread of Mandarin. As a result, Mandarin is now spoken fluently by most people in mainland China and in Taiwan. However, in Hong Kong and Macau, due to historical  and linguistic reasons, the language of education and both formal and informal speech remains Cantonese but Mandarin is becoming increasingly influential. Modern Mandarin vs. historical Mandarin. Historically, and properly speaking, the word "Mandarin" (官話) refers to the language spoken in the 19th century by the upper classes of Beijing as well as by the higher civil servants and military officers of the imperial regime serving in Beijing or in the provinces. This Mandarin language is quite close to modern-day Mandarin (普通话 / 普通話/ 國語), but there exist some differences. The Mandarin language used many honorifics which have mostly disappeared in  modern-day Mandarin daily speech, such as jiàn (賤 "my humble"), guì (貴 "your honorable"), bì (敝 "my humble"), etc. The grammar of the Mandarin language was almost identical to the grammar of modern-day Mandarin, with sometimes very slight differences in the choice of grammatical words or the positioning of words in the sentence. The vocabulary of the Mandarin language was also largely the same as the vocabulary of modern-day Mandarin, although some vocabulary items have now disappeared.