There are a few apps out there that have offline databases for common words and phrases, but you'll want to look for language specific ones and test them in Airplane Mode before trusting them. Anything that claims to do a huge number of languages or full sentence translation probably just uses an online translation service (probably Google's). Sorry, I don't know any for Portuguese that I can point you towards.