> If the safe then contained papers written in code, or an unknown language, would the court be able to compel the owner to translate those documents?
under some circumstances, they could. the "foregone conclusions" doctrine says that if they know 1) what the contents say, 2) that those contents are incriminating, 3) that you can translate it, and 4) can prove 1-3, then yes, then can compel you to do translate / decrypt.
this is exactly why they can compel you to testify against yourself. the additional testimony (decrypting your drive) is a "foregone conclusion". this is one of the few exceptions to the fifth amendment.