While English is probably one of the most difficult languages to learn (although I think Japanese and Chinese are right up there with it) it is also one of the most universally spoken languages especially in popular tourist areas. This was most evident when we visited Paris. The closer we were to the areas where most tourists are found, the more people spoke English to us.
Some people enjoy practicing their English with you. Others are more timid. But I've always seen a face light up (possibly in a moment of amusement) as you try to say something in their language. I believe it is appreciated though especially with those "magical words" that Mom taught you: Please and thank you.
A search online will help you to find a translator that will phonetically give you the words that translate the "magic" into the language of the country you are planning to visit. Add good morning or good day and of course cost or price if you plan to shop and you can charm your way through your trip.
And of course there's an app. Lots of apps actually. Some you can speak into and have it translated. Others you can use to take a picture of a sign and it will translate it. And still others where you can type in what you want to say. Apps are okay but I still think you will make more friends with your own attempt to remember how to say good morning no matter how much you may mangle the pronunciation. You can be that foreigner who brings fond memories to the local you encounter and a chuckle for what you tried to say.