For those who don't know LINE is a messaging tool like WeChat, WhatsApp So when someone entered a URL in their chat message, LINE App will show a preview of the URL (og:title, og:description) as seen in the image below
My understanding is that one can use the accept-language
in HTTP header to determine the locale for the content.
So my expected behavior is that if the LINE app is set at en-US language, I can see en-US in accept-language
. If the LINE app is set at zh-TW, I can see zh-TW in accept-language
(Similar to browser behavior)
But no matter what language I have switched to on LINE App, it always gives en-US
{ accept: '*/*',
'accept-language': 'en-US,en;q=0.8,*;q=0.6',
'user-agent': 'facebookexternalhit/1.1;line-poker/1.0',
'accept-charset': 'utf-8',
'x-forwarded-for': '10.115.21.78, 147.92.137.134',
range: 'bytes=0-1048576',
host: '8f66dff1.ngrok.io',
'accept-encoding': 'gzip,deflate',
'x-forwarded-proto': 'https' }
The thing is https://google.com can still able to determine the language change, as seen in the two images above where one is set at English, the other Chinese (But I am not sure if on Google end they receive the same HTTP header as above)
So the question is as titled, is there other methods to determine this? As I couldn't see anything else I could use in HTTP header. Or during content negotiation, there are other areas I can achieve what Google has done?
AFAIU, Google selects the language based on the sender's IP address.