Tried a lot in the meantime, but no success ...
I tested my script on Lithium, Moon Reader, Reasily on my Android tabler... different behaviour, but I haven't received the desired results.
To conclude: I think Epub has not been designed for such purposes.
So I decided to do something different: I'm going to develop my own Android app
using React Native.
For those who are interested: you can find tutorials on Youtube:
- 12 Language Dictionary App in React JS
https://www.youtube.com/watch?v=Nz6Q...1PXv16JRF-5y_5
- Create a Dictionary with React and Tailwind css
https://www.youtube.com/watch?v=BfnbPwqHhfY&t=634s
- Dictionary | React App
https://www.youtube.com/watch?v=dX9O...kfaGVQ4Wm8hnPo
All these are programmed with React - I have to use React Native, so we have to "redevelop" the source ... it is going to take some time, bit I thinks it's worth the efforts.
If this is useful for you: simply search for "react native tutorial" on Youtube, there are excellent courses ...
For me, I use (2.) as a template, because Tailwind looks amazing in my eyes ...
Kind regards, Frank