AppleScript in its original, 90’s classic macOS implementation, was said to support this. It compiled down to a symbolic representation, which was then restored based on which language was selected. IIRC only a French alternate language was ever developed (HyperCard had more, but those scripts were stored as text) but also a JavaScript “dialect”.
The compiled representation was mostly exposed to users when they didn’t have the app used in a script installed and just got FourCCs/OSTypes sprinkled throughout their script instead
The compiled representation was mostly exposed to users when they didn’t have the app used in a script installed and just got FourCCs/OSTypes sprinkled throughout their script instead