Mac supports language detection for spellcheck natively in the OS, at least as of 10.7.5 (Lion). This means any application running on mac that makes use of this service/library/API automatically has this feature. You can set spell checking in the Text pane of the Language & Text setting in the Personal line in the System Preferences App
Menu -> [Apple] -> System Preference -> Language & Text (Personal) -> Text
The Spelling entry here can be set to a specific language, but it can also be set to Automatic by Language. That may be the default. You will have to close and reopen an application before changes to this preference takes affect.
Note, however, that the algorithm used to decide the language may not be sophisticated enough. For example, I was writing up some notes (on R) and found that the line
par() - specify graphical elements
is treated as not English. From my "English is the only thing I ever use" perspective, the OS, for some crazy reason, just started using the wrong spelling dictionary, but just for this line! I don't know if this language misidentification counts as a bug, but it was very surprising and annoying until I discovered the auto-detection feature of the spelling checker and the rationale behind the strange appearance of the squiggly red lines.