You can’t learn every language, but its good to make an attempt to learn a few basic words before your trip.
Most guidebooks have a few pages toward the back with commonly used phrases. You can also pick up a phrase book for the language used in the region. Fodor’s offers Audiobooks with the types of phrases travelers need to know.
For more immersion, Rosetta Stone gets great reviews.