从雅虎获取口语

问题描述 投票:0回答:1

如何使用YQL获取一个国家的口语?

我的方法是:

select lang from geo.countries where name ="Italy"

但我总是以英语为语言:

{
 "query": {
  "count": 1,
  "created": "2015-12-27T23:43:58Z",
  "lang": "en-US",
  "diagnostics": {
   "publiclyCallable": "true",
   "url": {
    "execution-start-time": "28",
    "execution-stop-time": "98",
    "execution-time": "70",
    "content": "http://wws.geotech.yahooapis.com/v1/countries;start=0;count=1000"
   },
   "user-time": "103",
   "service-time": "70",
   "build-version": "0.2.369"
  },
  "results": {
   "place": {
    "lang": "en-US" // wrong language!
   }
  }
 }
}

您可以在这里使用 YQL 控制台:https://developer.yahoo.com/yql/console/#h=select+lang+from+geo.countries+where+name+%3D%22Italy%22

web yahoo yql yahoo-api
1个回答
0
投票

根据文档

lang
不是口语。

header
部分用于识别请求响应中的语言。

results
中,它用于识别使用哪种语言来描述该地点的本地化名称。

恐怕 GeoPlanet API 不会返回口语、货币等信息。它的重点是地理位置(坐标、州、县等)并提供多种语言的地名。

© www.soinside.com 2019 - 2024. All rights reserved.