基于 IP 的语言选择弹出窗口
我们正在寻找一种解决方案,可以弹出一个小语言/国家/地区选择功能,类似于 boots.com,您可以选择留在英国网站或选择任何其他语言或国家/地区。
用户应该有机会根据 IP 或网站的英文版本选择他的国家/语言。
您知道有什么服务/API 可以在外部处理此类请求吗?
布加德斯 托马斯
we are looking for a solution wo popup a small language / country selection feature, similar to boots.com where you can select to stay on the uk website or select any other language or country.
the user should have the opportunity to select his country/language based on ip or the english version of the site.
do you know any service / API who can handle such requests externally?
brgds
Thomas
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解正确的话,您需要根据客户连接的国家/地区做出一些决定。这称为 地理定位,有许多服务和 API 可以做到这一点,包括 基于浏览器的 (HTML5) 地理定位 API。
另请注意,用户语言的选择可以(应该?)不基于用户位置,而是基于他的首选语言;有一个 HTTP 标头正是用于此目的: Accept-Language。
但不,我不知道有任何服务可以将整个解决方案作为外部服务提供,您可以将其插入您的网站。
If I understand correctly, you want to base some decision on the country your client is connecting from. This is called geolocation and there are many services and APIs to do that, including browser-based (HTML5) geolocation API.
Note also that selection of user language can (should?) be based not on the user location, but on his preferred language instead; there is a HTTP header exactly for that purpose: Accept-Language.
But no, I don’t know any service which would provide the whole solution as an external service that you could just plug into your website.