Keelung replaces Kīrun
Name
According to early Chinese accounts, this northern coastal area was originally called Pak-kang (Chinese: 北港; Pe̍h-ōe-jī: Pak-káng). By the early 20th century, the city was known to the Western world as Kelung, as well as the variants Kiloung, Kilang and Keelung. In his 1903 general history of Taiwan, US Consul to Formosa (1898–1904) James W. Davidson related that "Kelung" was among the few well-known names, thus warranting no alternate Japanese romanization.However, the Taiwanese people have long called the city Kelang (Chinese: 雞籠; Pe̍h-ōe-jī: Ke-lâng/Koe-lâng; lit. '“rooster cage", "hencoop” or “chicken coop”'). While it has been proposed that this name was derived from the local mountain that took the shape of a rooster cage, it is more likely that the name was derived from the first inhabitants of the region, as are the names of many other Taiwanese cities. In this case, the Ketagalan people were the first inhabitants, and early Han settlers probably approximated "Ketagalan" with Ke-lâng (Ketagalan: ke-, "domain marker prefix" + Taiwanese Hokkien Chinese: 儂 / 人; Pe̍h-ōe-jī: lâng; lit. 'person'), the noun root being replaced with the common Taiwanese Hokkien term for people, while the domain marker circumfix "ke- -an" being reduced to just the prefix.
In 1875, during the late Qing era, a new official name was given (Chinese: 基隆; pinyin: Jīlóng; lit. 'base prosperous'). In Mandarin, probably the working language of Chinese government at the time, both the old and new names were likely pronounced Gīlóng (hence "Keelung").
Under Japanese rule (1895–1945), the city was also known to the west by the Japanese romanization Kīrun (also written as Kiirun).
In Taiwanese Hokkien, native language of the area, the city is called Ke-lâng. In Hanyu Pinyin, a system created for Mandarin Chinese in Mainland China, the name of Keelung is written as Jīlóng (the shift from initial K to J is a recent development in the Beijing dialect, see Old Mandarin).