Switch input language depending on physical keyboard attached
This type of functionality is sometimes called location management. Basically, the machine determines its location using hints from network connections. In the Mac OS 9 days, Location Manager was built in to the OS. Not so with Mac OS X.

Here is a discussion of a similar capability, although I don't know how current it is:

http://hints.macworld.com/article.php?story=2010042707531680