When I traveled to Paris, I spoke zero French. I was not worried about it because my cousin lives there and I expected her to be my translator. Well, she works a lot and I was on my own in a country I do not know the language. I listened, observed, and learned. By the end of my month there, I spoke enough to be polite and get me where I needed to go.
I also lived in Japan. However, this did not help me. They all speak English and they look forward to practicing so I never learned any Japanese. But in general, yes travel is a wonderful way to learn language.