I made something similar myself, based on TextMate's look up function plugin, that checks the current scope and if it finds a match will send you to a custom page regarding that language, otherwise will Google the word/selection. I've just purloined your language lookup to use, I hope you don't mind, but I thought I'd share this with you, who knows, maybe you'll find it useful too!