0

I have a list of English Wikipedia title (Wikipedia items) and want to get the their Chinese title. Is there any python methods through MediaWiki can do it?

  • It sounds like maybe you're looking for a "language translate" API callable from Python? Look at https://py-googletrans.readthedocs.io/en/latest/ or https://codelabs.developers.google.com/codelabs/cloud-translation-python3 – paulsm4 Jul 30 '22 at 14:49
  • Thank you! it's a way to get the results. I hope to do this through wikidata and I found a similar issue here: https://stackoverflow.com/questions/40724450/how-to-get-the-name-of-wikipedia-article-in-other-language. But I don't know how to do it with python calls. – user19508782 Jul 30 '22 at 14:56

1 Answers1

0

If you are talking about article names (usually H1 in HTML or extractable from URL) then go to Petscan and use the following settings:

  • Set English language for the interface (right next to the globe on the top)
  • Categories - Wikidata
  • Other sources - Manual list - list your English Wikipedia titles in the column (the first letter of the name should be capitalized, no stop sign needed)
  • Other sources - Wiki - enwiki
  • Other sources - Use wiki - (the last option) - znwiki (if you need a certain subversion of Chinese, you have to find its ISO code and replace the "zn")
  • Click on Do it! - it should generate the list below
Juandev
  • 21
  • 1