OS X per windows language
Solution 1:
Yes there is. Under Snow Leopard 10.6 :
System Preferences > Language & Text > Input Sources
you should see the radio option "Allow a different one for each document". Select that instead of "Use the same one for all documents".
Solution 2:
In OS X 10.9 it's set by checking the "Automatically switch to a document's input source" checkbox in:
System Preferences -> Keyboard -> Input Sources