By the time the Republic of China was founded, the terms 民主國 and 共和國 had been firmly established as translations for the English term "republic". Despite that, founder Sun Yat-sen insisted on using 民國, for he believed the new China was all about the people.
Both 民主國 and 共和國 were derived from preexistent concepts in ancient China but with a new meaning, "republic":
- 民主: (classical Chinese) "the emperor, master of the people"
=> (19th-century Chinese) "the president, leader of the people"; 民主(之)國 "a (democratic) republic"; 臺灣民主國 "the Republic of Formosa/Taiwan"
=> (20th-century Japanese) 民主政躰 minshu-seitai "a democracy"
- 共和: (classical Chinese) "the cooperative and harmonious regency during the exile of a Zhou king"
=> (19th-century Japanese) 共和政治 "the cooperative and harmonious non-monarchical governance of the United States"; 共和政治州 "the United States"
=> (20th-century Japanese) 共和國 kyōwa-koku / 共和政躰 kyōwa-seitai "a republic"
I wonder whether 民國 is also attested in classical texts and was given a new meaning by Sun Yat-sen, or wholly invented by him.