Apple’s Dictionary is one of the many powerful tools that ship with OS X, but sadly its one of the least used ones. Since the introduction in OS X 10.4 Tiger the number of dictionaries increased in every major version and it always got some love from the Apple engineers.
My favorite and most powerful feature was introduced with OS X 10.7 Lion: by pressing Shift + CMD + D a small WebView popover gets displayed in any application on your Mac. This can be used to display anything you want for example code documenation or cat pictures.
Create your own Dictionary
First of all, we need the Dictionary Development Kit. Because of structual changes in Xcode 4 the Kit got lost in one kf the tool packages. You can find it in the Auxilliary Tools for Xcode - October 2013 from Apple’s Developer Center or at Github.
In the Dictionary Development Kit you can find a folder named
project_templates. It contains a Makefile, stylesheet and an xml file that contains your dictionary.
You probably want to automate the creation of your dictionary xml file. If you are familiar with ruby, checkout my gem Inaho, it could save you a lot of time.
Build your Dictionary
Change the path to your Dictionary Development Kit your
Makefile on line 25 and use it to build and install your dictionary.
Check out Apple’s Dictionary Services Programming Guide for an in-depth guide of all the powerful features of OS X dictionaries like dictionary preferences and support for foreign writing systems.