Archive for the 'Language Aid' Category

Of NSServices and lsregister

March 5th, 2008
Spencer Nielsen Follow snielsen42 on Twitter


Launch Services is one of those things that does a lot of magic for Mac OS X but is not really visible on the surface and is somewhat vague and ethereal. Launch Services is responsible among other things, for associating file types with applications, associating icons, associating system services and many other wonderful things that make your experience just work. Fortunately there is a tool to poke at the Launch Services database buried in the system at:


Most notably the -dump command basically outputs the database so that you can see exactly why a certain file type wants to be opened by which app and why certain files get their icons and association hijacked by some other random new app. The -f command will let you update the database with any new changes you have made to an application or bundle.

Some of things managed by this database are the system services that show up in the “Services” option under the application menu (these are outlined in the NSServices array of a bundle’s Info.plist). Language Aid provides one of these as an alternative to the lookup trigger and contextual menu as a way to lookup text. Unfortunately, it appears that just tickling the database with the new information about which options you want available in the menu (dictated by which plugins you have selected), is not enough to rebuild the Services menu. A reboot seems to do the trick, but it would really be nice if I could figure out what causes that menu to rebuild.

Language Aid 1.1.2 is out!

March 1st, 2008
Spencer Nielsen Follow snielsen42 on Twitter

One of the things I hear most often while providing support for Langauge Aid is something along the lines of “I hovered my cursor over text in some program, hit the lookup trigger and it didn’t do anything/grabbed the wrong text.” This is sometimes because the application they want to grab text from does not support the Accessibility API or sometimes because what they were hovering over wasn’t really text. Thus I have added a feature in version 1.1.2 that should help alleviate confusion.


Now in Language Aid 1.1.2 if you hold down the lookup trigger for more than one second, a highlight bubble will appear containing the text that will be grabbed if you let up your lookup trigger. You can also move the cursor around while holding the lookup trigger to see the exact text that would be grabbed from any point that your mouse cursor can hover over. So now if you are unsure about what text will be sent to the plugin, simply hold down the lookup trigger and move the mouse cursor around until you find the text you want. The highlight bubble is also slightly translucent so you can see the text under it.

I have also slightly overhauled the main Language Aid website to focus more on the the three different ways that you can use Language Aid to grab text. I have added short videos that explain and demonstrate each way. Also, a quick side note on Quicktime video encoding…the “Prepare for Internet Streaming” setting is BAD. When run in my web browser I found that my videos would often play for a bit, then the video would freeze but the progress slider would keep moving. This would continue until the end of the video. If you scrubbed through the video it would seem to display fine. However, if you scrubbed to a section in the video and then pressed play, it would play for a bit and then freeze again. Strangely enough, when played through Quicktime Player this did not happen quite as much but still occasionally would occur. I found that when I turned off the internet streaming setting this behavior stopped. Also, setting my H.264 keyframes setting to “Automatic” from 24 seemed to cut my file sizes in half. I suppose the moral of the story is that it pays to deviate from the default video encoding settings.

Language Aid 1.1.1 is out!

October 23rd, 2007
Spencer Nielsen Follow snielsen42 on Twitter

There are four fairly major changes/additions in this version of Language Aid which make it more compatible and easier to use.

Services menu

The first of which is the added “Services” menu item. This new feature adds a Language Aid submenu to the Services item in the application menu. From here you can trigger any of your currently enabled plugin modules and have them act on the text you currently have selected in an application. This has the added benefit of being able to grab text from applications that don’t support the Accessibility API (required for Language Aid compatibility before) very well or even at all! This does not mean that Language Aid can act on text in every application but it does get it a lot closer!

Contextual Menu

The second major addition to version 1.1.1 is the contextual menu item which is very similar to the services menu. If you select a block of text in an application that supports contextual menu items and right click (or control-click for one button mice) a contextual menu with your active plugins are displayed which can act on the selected text block. Now you can have your plugin act on exactly what you select in Safari instead of having it broken up by links and other formatting! Again, this doesn’t work with every application but it significantly broadens Language Aid’s reach.

The third major feature is the inclusion of the MDBG plugin! This is a new plugin that performs Chinese dictionary lookups in a similar manner to the WWWJDIC plugin. This plugin was originally announced in a previous post and has been available through Language Aid’s built in software update but is now included standard with Language Aid. Gradually we hope to expand Language Aid’s reach to more and more languages!

The last reason to upgrade to version 1.1.1 is for Mac OS X Leopard compatibility. There were a few changes in Apple’s new operating system that caused previous versions (<= 1.1) to not behave as expected. These changes have now been accounted for and going forward Language Aid should be fully compatible with both Tiger and Leopard. Perhaps at one point in the future we will start to take advantage of Leopard specific behavior.

MDBG plugin for Language Aid released!

October 15th, 2007
Spencer Nielsen Follow snielsen42 on Twitter
MDBG logo

At long last we have another plugin for Language Aid! Today a plugin for the Chinese dictionary lookup site MDBG was released for Language Aid version 1.1. This plugin is similar in function to the WWJDIC plugin in that it can take small or large chunks of Chinese text, send them off to the MDBG which provides dictionary lookups for words that it parses out of the text and then display the results. Much thanks goes to the administrator of the MDBG who was very cooperative and helpful in the development of the plugin! You can get the MDBG plugin by clicking on the “Add New Modules” button the Language Aid preference pane and selecting the MDBG plugin. You may need to wait a bit before it shows up in the plugin modules list after installing and restart Language Aid to get it to work correctly. If you know of a web service that can perform translation or dictionary lookups for your favorite language let me know. Also, Language Aid 1.1.1 is just around the corner with some small (but nice) new features.

Language Aid on the Mac People DVD

August 4th, 2007
Spencer Nielsen Follow snielsen42 on Twitter
Mac People DVD

A while ago one of the editors at マックピープル (Mac People) magazine asked if they could feature Language Aid in their section on shareware/freeware. I happily accepted and greatly appreciated the free advertising. A while later they asked if they could include Language Aid on a DVD-ROM that they publish containing freeware/shareware called オンラインウェアDVD (Onlineware DVD). The DVD arrived in the mail yesterday (picture is at the right). I have not worked directly on Language Aid for a while but I do have a couple more plugin modules in mind that I want to implement and the next set of new features are all laid out. I have been working a project peripherally connected to Language Aid which has taken a lot of my time lately, but this has come to a good stopping point so that I can return to working on Language Aid more.

Language Aid 1.1 is out!

April 21st, 2007
Spencer Nielsen Follow snielsen42 on Twitter
Language Aid Logo

It has been a while (Oct 2006) since the last release of Langauge Aid and it is high time for a revamp. Language Aid 1.1 is actually a fairly big upgrade from the previous version of 1.0.1. This is mainly because the nature of Language Aid is changing from that of being an exclusively Japanese oriented tool to one of a more general nature. The most requested feature for Language Aid by far has been something like… “Can you get Language Aid to support language _______?” To which I have had to previously answer that it does not :(. But with the release of version 1.1 now a lot of text processing functionality has been exported to plugins! This means that anyone with some programming experience can now write a plugin that will interface with any web service or lookup system that they want by using a straightforward SDK. The hope is that people who desire functionality for using Language Aid with other languages or services now have the power in their hands to make it happen. I would also like to foster a community around Language Aid plugins as well as expand the number and variety of plugins that are shipped with Language Aid. All in all, a very exciting release for me. However, there is a lot more good stuff coming in the future so stay tuned.

Entries (RSS) and Comments (RSS).