ckilb / dictionarymode.koplugin

Enables dictionary mode (one tap dictionary lookups) in KOReader
8 stars 1 forks source link

Modifying the Plugin to use a Different Dictionary than Regular Long-press #3

Open Bluemoondragon07 opened 1 month ago

Bluemoondragon07 commented 1 month ago

Hi! Thank you for your hard work on this plugin!

In KOreader, there are different dictionary options. An external dictionary can be used, and if selected, different options appear for 3rd party apps that can be used as the external dictionary.

I was wondering if I could have the dictionary plugin dictionary set separately from KOreader's long tap dictionary.

Specifically, how would I change the code or write a patch to get the dictionary plugin to use a different dictionary than the main one? For example, return { "Takoboto", "Takoboto", false, "jp.takoboto", "send"} (an external dictionary) on tap when the KOreader settings are set to something else?

A regular long press would use the dictionary set in KOreader, but this patch/modification would mean the dictionary mode tap would bring up a different, designated dictionary.

You can close the issue if you want, since this is kind of a weird question. It would be useful to me, but I don't know how to do it.