A discussion on the Danish Macintosh community, Macnyt, about the missing native Danish spell-checking in Mac OS X, let me to speculate on what it would take to implement it. Apple you’re more than welcome to steal it, and I’ll even post bail ;-).
NOTE to Danish Mac users: What follows will not give you native (Danish) spell-checking in Mac OS X, but it describes what I believe would be required, by Apple, to implement it.
What? No Danish?
Apple’s Mac OS X comes with a very nice, integrated spell-checking service. Unfortunately there’s no support for the Danish language, and this omission hits all Mac OS X applications that plug into Mac OS X for their spell checking services. This excludes Microsoft Office:mac and most open source software like Open Office and NeoOffice, that has their own spell checkers, but it hits all system applications as well as Apple’s own iLife, IWork and most other 3rd party applications.
I know from experience that this is a major issue with Danish Mac users, the question surfaces again and again.
cocoAspell to the rescue
The current solution is to install cocoAspell, a Mac OS X wrapper for the Aspell open source spell checker, and download the Danish dictionary. If you understand Danish, you can also get help from Æbletræet and this detailed guide (ZIP file) made by a Macnyt user.
Unfortunately that is not something the average person knows how to do, and it’s relatively complicated.
How to implement native Danish spell-checking in Mac OS X
So here it is: This is what I have found out, that it would take to implement native Danish spell checking in Mac OS X.
From an implementation point-of-view, it looks like it is quite straightforward.
Everything is located in the AppleSpell.service package, that is located in /System/Library/Services.
The file is organised like a .app package, first a Contents folder, that contains a Resources and a Mac OS X folder, along with a PkgInfo file and some .plist files.
Each supported language is represented by an entry in a .plist file called info.plist located in Contents, and a .lproj folder located in Contents/Resources.
The .lproj folder contains two files, one is called bindict, the other Dictionary.dat.
Problem: bindict and Dictionary.dat are binary files, and I haven’t been able to locate ANY documentation of the formats.
Step-by-step guide (for the Apple engineers):
- Get a copy of the “Store Danske Ordliste”
- Organise it “in a manner that is compatible with your indexing software” (this is the hard part, and I’m sure you could get community involvement in this).
- Run it through your indexing application (or lend us a copy)
- Create a new AppleSpell.service package
- Add the entry for Danish to the Contents/info.plist file
- Add a folder for Danish language to Contents/Resources
- Add the bindict and Dictionay.dat files created by the indexing application to the folder for Danish language
- Replace the old AppleSpell.service package with the new
- Ask the Danish Mac community to help test it
- Release it with the next, minor, update of Mac OS X
I estimate that it would take no longer than 1 man-week to implement and test this – so Apple come on…
p.s.. do you really need to reinvent the wheel?
In many ways cocoAspell, is a better and, not least, open solution, so Apple you should really consider the alternative: drop the native spell-checker and embrace cocoAspell, there’s really no need to reinvent the wheel is there?