I’m trying to create a web-page intended to be viewed by an iPhone OS device. Is there a way to retrieve the current language or some locale-specific data when a user visits on an iPhone OS device? I want to set the web-page language according to the local or language of the device. So, how can I get the language-setting of an iPhone OS device visiting my web page?
Share
Try using the “Accept-Language” header sent by the browser to the server. It should be something like “en-us” or “fr-fr”, etc. depending on the language setting for the device.