Of course learning the language and customs of a country is optimal to learn first then try to learn their culture. In my opinion doing these actions is a must if you want to travel to a different country that has another set of principal than yours.
It would be much better if everyone would know how to speak english there but you can`t afford to take that risk so you can learn the basics of their language to, maybe, not offend them by not showing interest in their culture.
Cross-culutural communication is the key in making the planet a better place and I think everyone should take this advices.