For an app I'm developing for Facebook, when the user first logs in, I'd like for my interface to be in the language they have chosen for their Facebook interface.
(More accurately, since Facebook has more language options than I do, I'll see if their language is among my list of languages, and if so use that language. If not, default to English.)
I know I can get the user's locale
from the list of columns they keep of user data.
However, I'm unclear if the locale is equal to their language. If an American lives in Beijing, and sets their interface to use English, wouldn't their locale be China? If I go by that, my interface might be in Chinese, which, depending on the American, could be different from their Facebook interface.
I notice on the same list, there is an array of languages that the user can set if they are multilingual, but I'm not sure if that's a really good indicator of anything. People tend to list languages they can only partially speak, so it might not be helpful to try and go through that list.
Bottom line, what exactly should I do to get a Facebook user's interface language from my PHP script in my canvas directory?