Translate Code From One Language to Another
Convert code between programming languages while using idiomatic patterns in the target language.
§ The Prompt— ready to copy
code-translate-language.prompt
Translate the code below from [SOURCE LANGUAGE] to [TARGET LANGUAGE]. (1) Preserve all logic and behavior exactly. (2) Use idiomatic [TARGET LANGUAGE] patterns — don't just do a literal translation. (3) Replace library calls with the closest [TARGET LANGUAGE] equivalent and note any differences. (4) Add a comment anywhere the translation required a meaningful decision. SOURCE CODE: [PASTE CODE]
Replace anything in [BRACKETS] with your specifics before sending.
Best For — Roles
Use For — Tasks
§ Related Entries
You may also need
№ 006coding
Explain Complex Code in Simple Terms
Turn confusing code into a clear, junior-friendly explanation with edge-case notes.
For
claude·chatgpt
№ 030coding
Write Clear Technical Documentation
Generate complete Markdown technical docs with params, examples, and error handling.
For
claude·chatgpt
№ 012coding
Debug an Error Message Step-by-Step
Get a structured debugging plan: error explanation, ranked root causes, tests, and fixes.
For
claude·chatgpt
№ 022coding
Generate Unit Tests for a Function
Generate comprehensive unit tests with happy path, edge cases, and failure modes.
For
claude·chatgpt