Not so long ago, the only help available when translating text from one language to another was a dictionary and a grammar book. That’s how it was when I started learning German. Now, there are a number of tools online to help you in your bilingual quest, but you have to be clever to get the most use out of them. My examples will be in German, but these techniques can be applied to most languages that have a strong online presence.
A Good Dictionary - This is still your first line of defense against the hostile hoards of foreign words. For German, the best is clearly LEO. The reason it’s better than your trusty Langenscheidt’s or Oxford-Duden is that it’s user created and maintained, so you get idioms, slang, and current events.
Google for Grammar - If you don’t know which of two or three possible variants is the correct one, Google all of them and see if one has many more hits than the rest. Important here: put the phrase in quotes. This is especially good for things like which preposition to use with more common words. Let’s say you want to translate “I’m going to Chicago.” Which preposition do you use? Try searching for a similar phrase (in this case, altered for geographic relevance) and see if one stands out. Go to google.de and click the “Seiten auf Deutsch” (Pages in German) button. Then try three reasonable guesses:
It looks like we have a clear winner. You can be pretty confident translating your sentence as “Ich gehe nach Chicago”. However, this isn’t always foolproof. If you had searched for “gehe in Berlin” you would have gotten 576 hits and the results wouldn’t have been quite as clear. But, after reading the first few hits, you’d have realized that it’s not what you’re looking for.
Wikipedia - This is especially good for technical terms. Suppose you want to talk about the famous Quicksort algorithm in German. LEO won’t help you. So, go to the English Wikipedia page for Quicksort. Then, look down on the left side of the page in the “languages” box. Click “Deutsch” (if it exists) and you’ll be taken to the equivalent German page. In this case, you find out that Quicksort is the same in English and German, so now you can (not) translate it with confidence.
Names - You read a foreign name and you’re not sure what gender it is. Sometimes that doesn’t matter, but if you want to talk about this person, it sure is useful to be able to use pronouns. So, to figure it out, do a Google image search, preferably at the Google site for the country, and look at the results. Example: Johannes vs. Johanna (I read this somewhere online, but I’m not sure where. It’s especially helpful for Asian names.)
Machine Translation - I list this one last because it’s generally the least helpful. The two main free sites are Google Translate and Babelfish. These sites are slowly getting better, but right now they’re still of limited value. They’re good if you want to read something in a language you don’t know at all or it would take you a long time to do the translation yourself and you just want to get the gist of the text.