siongui / paligo

Online Pāli Dictionary and Pāli Tipiṭaka implemented in Go programming language.
https://dictionary.sutta.org/
The Unlicense
27 stars 7 forks source link

Add support for Spanish dictionary #4

Open javiernanni opened 2 years ago

javiernanni commented 2 years ago

Hi there! First of all: thank you so much for creating this! I'm learning Pali and was considering asking a friend to build this as a side project, but I'm happy to see you've done most of the things I wanted (dictionary + Pali suttas with click-to-get-definition feature).

I'm wondering: how can I help you add support for a Spanish dictionary? I'm adding a link below to the Pali-Spanish dictionary my teacher suggested. What would need to happen for you to include it? I'm assuming the PDF would need to be dissected into some kind of database... I don't have the time to do that myself at the moment, but if you give me the specs of what you need, I'll be happy to hire a freelancer to help get it done.

https://www.dropbox.com/s/1rrz2ysdapykbsx/Diccionario_pali_espanol.pdf

siongui commented 2 years ago

Hi, nice to hear from you! It's easy to add Spanish support as long as you export the PDF as some format that is easy to parse by program. Basically I would suggest that you export the PDF as array of (key, value) pairs, where

key: the Romanized spell of the pali word. For example,

sacca

value: the string of HTML format which contains the meaning of the word. For example,

\<em>nt.\</em> \<strong>sacca\</strong> means truth

You can export the array of (key, value) pairs to JSON, CSV, or any popular format that is easy to read and parse by program. Thanks again for your help :)

javiernanni commented 2 years ago

Sounds good! I'll try to get this done and come back here with the file. It might take some time. Once this is done, I would also be happy to help translate the web app's UI itself to spanish so you can add it as a supported language. I can do that myself.

Happy new year!