This method involves not parsing sentences the way you learned to do in grade school but rather comparing lots of phrases with their existing translations (which Google did by downloading stacks of translated documents, like those from the United Nations).