You can ask some variant of:
- Where are your ancestors from?
- What can you tell me about your heritage?
- What values do you cherish in your family?
- What does your name mean?
People are naturally interested in their ancestry and are often proud of their heritage, culture, and values. Phrasing it in terms of people and kinship makes the question much more conversational and less fraught with land-mines than a question about one's style of dress, accent or skin color, although many gracious individuals will not have any problem discussing these because they understand the connection to their roots and are happy to share it.
Some will be embarrassed and will not know about their own heritage. Some may still take offense at the question no matter how nicely it is worded. It is not normal to be diffident about where one's name comes from, what it means, or what is one's heritage or ancestry. In these cases you can help them to develop a wholesome curiosity in these by making an inquiry with a clear intention to laud their virtues and to know their culture and values. You can give truthful examples about what you have learned about others who might have some common ground with them. E.g. "The Salvadorians I have met have been unanimously cheerful and generous. I want to know where they get it from.". This may spark some flicker of recognition of their own culture, values and virtues, and even if it misses the mark of their own background or interests, it is a gracious compliment of a pleasing attribute they may internally receive further motivation to strive for or to recognize in others.
Others may value their heritage on a deeply personal level but may consider it too sacred or private to discuss openly. Still, it is entirely appropriate to achieve at least an approximate understanding of their special strengths, and such conversation often does develop into communication and appreciation of their more definitive attributes. In such cases you can always clarify that you are trying not to pry but that you also prefer not to be too superficial.
Some people may simply be unwilling to discuss their identity and origins, and so it is in good taste to concede them their desire, with clear good will on your part.
In many conversations I have had, it becomes more natural to ask about second languages, etc. once a place of national heritage is established, e.g.:
Stranger: "My family is from Russia"
Local: "Privet!" (Clarifying that this is the only phrase I know in Russian, but it is a clear token of friendliness.)
There is nothing about the fact of having a distinct national heritage that singles a person out as "foreign" or "out of place". All people have a heritage that traces back through some place that is with increasing frequency different than the place where they now reside or are visiting, as implied in the question.
These are clear, unoffensive questions and they avoid the trap of trying to trace a complex timeline of where a person has lived or visited, which nowadays is very lengthy and is usually much less meaningful than one's ancestral origins.