Hmmm... it seems that I would need to fiddle with tm_properties then, as changing the language when TM is running is broken. At least when I have several files in multiple languages.
If you're writing in a markup language with a commenting environment, you might be able to add to the grammar (creating scopes for different languages) and then set the languages for those scopes in the tm_properties file.