Quote:
Originally Posted by FrankJH
I guess one has to use a database ... but is this possible within an epub?
I think we have to use Javascript for these purposes ... but maybe I'm wrong
|
I experimented with this some time ago and found out that it's
theoretically possible to embed a sqlite database in an epub and query it using a sqlite JavaScript library.
If you open my proof-of-concept epub3 file with Calibre Editor or Apple Books you should get single-word German definitions, if you click on
book,
house or
mouse in the second paragraph.
However, if you look at the source files, you'll notice that the size of the 6 word demo database is already 164KB, which makes this approach impractical.
BTW, there's an
IDPF dictionary proposal that nobody seems to be interested in.
You might want to look into creating Stardict dictionaries. They're supported by many Android epub apps and
KOReader.
You could also simply convert your epubs to Kindle books and read them with one of the free Kindle apps, which come with excellent free dictionaries.
(You could also convert HTML source files (with custom markup) to Kindle dictionaries with KindleGen.)