https://github.com/koreader/koreader...ionary-support
Seriously, ditch the internal dictionary in the long term. koreader supports stardict directly. I think best would be just hack koreader to pose as Dictionary.app too, the script invoking its dictionary lookup dialog routine directly even w/o book opened.