Hi all!
There's a movie being made adapted from a book (Aadujeevitham) in my mother-tongue (malayalam) so I wanted to read it. Because I was brought up outside of India, my reading abilities are not as good as I'd like them to be, so
I just wanted to share what I did to make a custom dictionary for myself so I could select any malayalam word and get the english definition. I was searching for a solution myself and I wasn't able to find one, especially since Kindle Previewer blocks exports for Indian/Arabic langauges.
(This blog post by Jake McCrary was very helpful to me in the process
https://jakemccrary.com/blog/2020/11...le-dictionary/)
1. I converted the epub to a txt file (so this isn't a dictionary of every word, just the words in the book)
2. did some regex to get rid of special characters, empty lines, english words, and duplicates.
3. I pasted it all into a spreadsheet and uploaded the spreadsheet to google translate.
4. I merged the contents of both the spreadsheets and added some columns so I could have the following format (additional details in the blog post above)
<idx:entry name="default" scriptable="yes" spell="yes">
<h5><dt><idx

rth>WORD HERE</idx

rth></dt></h5>
<dd>DEFINITION</dd>
</idx:entry>
<hr/>
After following the rest of the guide,
I hit a snag, which was that the Kindle Previewer app wouldn't let me export since I was using Indian languages in the file. Surprisingly though, just by changing the <DictionaryInLanguage> to english, it worked (even thought the in language would actually be malayalam).
I know this is a niche use-case, since most languages already have language-to-english dictionaries, but I couldn't find one for malayalam (and i think this might be the case for some other languages too). Hope this helps someone in the future that's trying to read a book in language they're not entirely familiar with.
The book I'm reading has also been translated to English as Goat Days, so check it out if you're interested