If the program is meant to do the same thing in two languages, this should probably be disallowed, for obvious reasons.
If the program is meant to do different things in the two languages, allowing this is more interesting, as the programs will have to be split away from each other somehow. Using a version check for this (or equivalent) is really boring, but has the issue that it's hard to ban in an objective way (it can sometimes be banned indirectly, via downvoting and/or pressuring the author into self-deleting the post). Solutions which rely on differences between the languages (especially if most people believe the language to be backwards-compatible), on the other hand, are often more interesting than solutions between two unrelated languages.
Note also that, in general, it's hard to define objectively if two languages are different versions of the same language. For example, is A Pear Tree a "version" of Perl, or V a "version" of Vim, or Vigil a "version" of Python? I don't think there's any way to create a rule here that's both loophole-free and objective, unless we move to an approach in which validity of a language depends on factors other than the definition of the language itself.