Literary Chinese in Vietnamese called Văn ngôn (Chữ Hán: 文言) or Cổ văn (古文), Hán văn (漢文) this 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 in Vietnam.