updated google translate function def