Literary Chinese (Vietnamese: cổ văn 古文 or văn ngôn 文言) was the medium of all formal writing in Vietnam for almost all of the history of the country up to the early 20th century, when it was replaced by vernacular writing using the Latin-based Vietnamese alphabet.
The language was the same as that used in China itself, as well as Korea and Japan, and used the same standard Chinese characters. It was used for official business, historical annals, fiction, verse, scholarship and even for declarations of Vietnamese determination to resist the Chinese.
Literary Chinese was a style of writing modelled on the classics of Warring States period and Han dynasty such as the Mencius, the Commentary of Zuo and Sima Qian's Historical Records. It remained largely static while the various varieties of Chinese evolved and diverged to the point of mutual unintelligibility. The language was also used for formal writing in Vietnam, Korea and Japan, enabling scholars from these countries, as well as China, to communicate in writing, in a role similar to that of Latin in Europe.
Literary Chinese as written in Vietnam used the same characters and outward form as in China. Although Literary Chinese was used only for written communication, each Chinese character could be read aloud in a Vietnamese approximation of the Middle Chinese pronunciation. For example, the term for Chinese characters, 漢字 (Hànzì in Modern Standard Chinese) has a Sino-Vietnamese reading of Hán tự. With these pronunciations, Chinese words were imported wholesale into the Vietnamese language. The resulting Sino-Vietnamese vocabulary makes up over half the Vietnamese lexicon.