Depends upon the languages you are working with, this could be a simple matter of basically finding an online tool that does the translation for you to a complex rewrite task.
In all likelihood, if you are looking at a huge block of code that needs to be translated you are more likely looking at a full application that needs to be rewritten in which case you should use the previous application and code-base as a reference, but shouldn't really like it drive the application you are writing. Review the code, see if there are any relevant comments in it as to unusual business logic that you may need to take in to account, but beyond that you can look at things as a new project and just use the former application as a sanity check to ensure you did your job right during testing.
If you are looking at just trying to replication some functionality and port it to another application in a different language, then CashCow's advice to write test cases is very important. Make sure you know what the expected outputs are before you start writing new code and also see if you can figure out how things behave during the edge cases. Likewise, make sure you understand what the code is doing so you don't encounter more problems down the road. Likewise, make sure that the languages translate well between each other, if you are working with code where numeric accuracy is required, you want to make sure that that the
double you are using in C# behaves the same way as the
double precision in Fortran that it is replacing. In short, some extra time doing research up front may save you from hours of stress due to failing test cases or errors that aren't caught by the test cases you write.