Best way to determine user's locale within browser

前端 未结 10 1210
旧巷少年郎
旧巷少年郎 2020-11-22 09:54

I have a website (Flash) localized into a dozen of languages and I want to auto-define a default value depending on the user\'s browser settings in order to minimize the ste

10条回答
  •  粉色の甜心
    2020-11-22 10:30

    You can use http or https.

    https://ip2c.org/XXX.XXX.XXX.XXX or https://ip2c.org/?ip=XXX.XXX.XXX.XXX |

    • standard IPv4 from 0.0.0.0 to 255.255.255.255

    https://ip2c.org/s or https://ip2c.org/self or https://ip2c.org/?self |

    • processes caller's IP
    • faster than ?dec= option but limited to one purpose - give info about yourself

    Reference: https://about.ip2c.org/#inputs

提交回复
热议问题