Where does the country of Japan get its name from?

Context: The name for Japan in Japanese is written using the kanji 日本 and is pronounced Nippon or Nihon. Before 日本 was adopted in the early 8th century, the country was known in China as Wa and in Japan by the endonym Yamato. Nippon, the original Sino-Japanese reading of the characters, is favored for official uses, including on banknotes and postage stamps. Nihon is typically used in everyday speech and reflects shifts in Japanese phonology during the Edo period. The characters 日本 mean "sun origin", which is the source of the popular Western epithet "Land of the Rising Sun". The name "Japan" is based on Chinese pronunciations of 日本 and was introduced to European languages through early trade. In the 13th century, Marco Polo recorded the early Mandarin or Wu Chinese pronunciation of the characters 日本國 as Cipangu. The old Malay name for Japan, Japang or Japun, was borrowed from a southern coastal Chinese dialect and encountered by Portuguese traders in Southeast Asia, who brought the word to Europe in the early 16th century. The first version of the name in English appears in a book published in 1577, which spelled the name as Giapan in a translation of a 1565 Portuguese letter.

Answer: The English term "Japan" dates back to a 16th century English translation of a Portuguese book which named the country using an old Malaysian name borrowed from a southern coastal Chinese dialect. The explorer Marco Polo wrote the name as Cipangu in the 13th century based on early Chinese pronunciation. Interestingly, Japanese refer to their own nation as "Nihon" or in official government uses as "Nippon" which is written on banknotes or postage stamps. Both terms are is derived from the Chinese pronunciation of two characters which mean "sun origin" which was adopted in 8th century Japanese literature.