I would say it is a good idea to have some common phrases or things like directions, yes and no. Also learn to say "I don't speak ,,, " whatever language the country you are in speaks.
Most people will appreciate that you as a guest have tried to learn some of their language and be very pleased to help.
Also consider learning phrases in what may be a regional common language, so in Europe, German, French and Italian would be good. English may serve you in most cities. But always consider the person you ask may be a tourist as well.
Once you let a person know that theirs is not your first language you may get help via hand gestures and such. there are many ways to communicate so be ready for anything. Have a few stock phrases to hand before you go.