Like others have said, I think this really just comes down to experience. Keep at it, become comfortable with the languages, and it shouldn't be an issue.
Writing beautiful idiomatic code in multiple languages is a big challenge, but writing syntactically correct code should just come naturally after a while.