Well, it tries, and for basic things you can usually get something approximating an accurate sentence, but there's two important things about it. First, all Google translations work primarily based on the translation suggestions humans have suggested, making it more a crowd sourced translation than a machine translation, and second, the grammar is still usually wrong. I get a lot of people who volunteer to work with us as translators who send back jibberish spat out by Google. We can always tell when that happens, because the first thing we do when we get a bad translation is see if it's 95+% matching Google's translation. Romance languages might be a little easier, but not much.