In the interactive fiction that I create, I would like to add a new feature. Specifically, when the reader encounters an unknown word, the reader can quickly and easily display a definition.
I need advice about implementing this feature.
IDEAL
- I do not want to build my own dictionary. I would rather use a dictionary service online or an application.
Reason: There are many existing dictionaries available through the Internet; they are the experts. Moreover, building my own dictionary contributes to redundancy.
- I want the definition to appear in a popup window, not in a new browser tab.
Reason: My interactive fiction story files run in a window, so for consistency and to minimize yanking the reader out of immersion in the interactive fiction, a popup window seems better.
- I will link words in the text of the interactive fiction that have an associated definition.
Reason: The reader simply needs to click the link in order to display the popup window that contains the definition
Less desirable possibilities:
- The reader can highlight any word in the text of the interactive fiction, then press a hotkey combination to display the popup window that contains the definition
- The reader can hover the cursor over any word in the text of the interactive fiction, then press a hotkey combination to display the popup window that contains the definition
- If a dictionary entry has more than one definition, I should be able to specify (e.g. through a parameter on the call statement) the exact definition that should appear in the popup window.
Reason: Eliminates the need for the reader to sift through the definitions
NICE TO HAVE
- Support for multiple dictionaries
Reason: The text of the interactive fiction could contain both
- a “difficult” English word such as proscenium, in which case an English definition needs to appear in the popup window
- a foreign-language word such as précieuses, in which case an English translation needs to appear in the popup window
ADVICE
I would appreciate any advice about a specific dictionary service online or a specific application to use, a specific work of interactive fiction that successfully allows word definition lookups, design techniques, etc.
Thanks.