Sure, you could specify a programming language when sending messages in Teams client.
To send a code snippet in a chat or channel message, first click Format below the compose box, then select Code snippet
in the format bar. This opens a dialog box, where you can enter your code as well as a title for the snippet. Select the language you want to use, and choose whether you want your text to wrap.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.