Definition: Given a travel related situation, and given a specific question about the situation, summarize the question into a title
Input: I'm an American traveling to Central America for the first time this summer. I'll be entering Costa Rica and Panama.

My Spanish is pretty good, but not native, and I wouldn't mind using it, but as a general rule, should I try to address the border officer in their language when I can or should I stick to English?

How it went: I transited Costa Rica without being asked any questions at all, but I entered remote Bocas del Toro using only Spanish (and let me tell you, it was much smoother for me than for my English-only traveling companions) and exited Bocas in English (different officer).

All in all, I followed the advice here, and answered in the language I was addressed in.

Output:
In what language should I address foreign customs and immigration?