I once asked a Finn on a social media site if I should learn some Swedish if I visited Finland. Since Swedish is an official language in Finland and much easier for an English-speaker to learn than Finnish, I figured that by speaking Swedish, I would not stand out as an "ugly American." The Finn replied that it would be better to speak English, since Americans are not disliked in Finland, but Swedes are.
I also heard if you go to Spain, to Catalonian cities like Barcelona, if you speak Spanish, they won’t talk to you, if they think you’re from Spain, as they want folks from Spain to speak Catalan instead, but if you are a foreigner, and have an accent, and they know you are an American, they will speak Spanish to you.