Translation:Are you a foreigner?
がいじん means foreign looking and can be mildly offensive, がいごくじん means a genuine foreign person and is safer to use by the Japanese natives. If you are a foreigner you can use either to describe yourself.
The kanji 国 meaning country has a pronunciation こく(koku), but in some cases the initial consonant can be softened to ご depending what comes before it. It's still the same word and you'd even say it's still the same reading of the kanji (most of them have several entirely different readings, also based on context), it's more of a quirk of pronunciation as the words flow more naturally one way or the other.
"Nobody in Japan would say 外国人 , except a school teacher. Foreigners are simply 外人. Though technically 外人 could mean anyone from far away, and not necessarily from a foreign country."
Long story short: Japanese kid said 外国人 rather than 外人 when speaking to herself about me, even though she didn't think I'd know what she was saying anyway. ^^
When I went travelling in Japan for a month, the only time I heard either was when I was walking down a random street. It was a main road not all that far from tourist areas, but far enough that tourists would almost certainly catch a bus rather than be walking there, and there weren't many pedestrians about.
There was a Japanese elementary school kid walking on her own the opposite way to me on the same side of the street. I had barely even noticed she was there and was just plodding along minding my own business. As we got near she suddenly noticed me, slowed down slightly and started staring at me, and then said「がいこくじん」in a soft but very clear voice.
She said it from only about 8 feet away, at regular speaking volume, and with her head still turned completely towards me when she said it. Her expression was as though she had just encountered something very unexpected and rare. It seemed she was simply speaking to herself out loud, to express her amazement to herself. It was clear she hadn't even considered that there could be any possibility I might know the word she was saying (or, more likely, even of any chance I'd know any Japanese whatsoever).
I think she was expecting I'd continue on walking straight past her—that I'd completely ignore having heard anything since she was speaking in Japanese. However, I responded by turning my face towards her and giving a gentle smile whilst carrying on walking.
She then went a little red with embarrassment, maybe at having spoken to herself loud enough that it got a response, or maybe for having said such an odd thing towards someone whom she assumed had then smiled politely back not understanding that she'd said such a thing. She then quickly scurried on after that. Was pretty amusing. ^^
I originally posted this a year ago. But the person I replied to has now deleted their comment, resulting in my comment vanishing along with it. As my tale apparently received a lot of likes, I'm un-vanishing it by copy-pasting it from the hidden realm of deleted post data back into this new comment. ^^
Similar to "haole" in Hawaii. It is used to describe a white person (although it's true meaning is any foreigner): "We met the haole store owner (not the Japanese one)." But it can be explicitly derogatory: "That haole tourist (who jumped in the water right in front of you while catching an awesome shore break on your bodyboard)." It's all in the context.
異邦人(いほうじん）sounds rather old-fashioned and has the image of being opposite to 邦人(ほうじん), referring to a Japanese person. It also seems to be used in Christianity and Judaism to refer to someone, who is not a believer in said religion but a "wrong/bad religion".
In Christianity/Judaism, it would translate into more of the word "gentile". But thats the bible in Japanese.
Apparently, it can't be "Am I a foreigner?"
All of the sarcasm that I've heard in anime has been nothing but lies.
I put "Are you from overseas?" and it was rejected. Where I come from saying foreigner can sound a little bit offensive. Would this be accepted?
Depending on the situation, could 外国人 refer to a Japanese person (like if a Japanese guy is in a different country) or is there a different word that should be used? アメリカに私が外国人です
It's a case of values dissonances. The word itself isn't a slur, but then again, everything considered...
May 5, 2019: In the choices, using "外国人" instead of "外国" and "人" yields a wrong answer, please fix this bug DUOLINGO. Thanks in advance.