A quick search revealed that all one had to do was to add the “notranslate” class to any wrapping object to prevent its contents from being translated.
Now, I use the Syntax Highligher Evolved plugin to display code on my site (although I use an older version because I like the look and functionality of it better than the latest version). So I edited the plugin and found where it inserts the PRE tag, and added the notranslate class to it. And voila, now my code doesn’t get translated anymore.
Just a helpful tip for anybody who posts code on their sites.