I wish to make such a PHP code..so the if any person from Brazil enters any text in textbox..then it will get translated into English

Previously I was using Google Translator API to do so...but now its not working