雅虎天气Api语言

时间:2012-08-21 06:26:23

标签: android yahoo yahoo-weather-api

我正在使用天气取景器和雅虎天气api。 默认情况下,我收到美国英语语言的回复。 我想用韩语改变回应。

请分享想法。

3 个答案:

答案 0 :(得分:4)

在访问了这么多网站后,我发现雅虎不支持使用多种语言进行天气API响应。

答案 1 :(得分:1)

是的,我认为雅虎天气不支持多种语言,雅虎只需要2个参数w(WOEID)和u(单位)。

但您可以考虑使用strings.xml来映射天气代码。

例如,在您放置的values / strings.xml中,然后在values-fr / strings.xml中放置dis pasible

您需要为0到3200之间的所有Yahoo Weather代码执行此操作。并将另一个文件夹值 - [country_code]替换为另一种语言。进一步阅读,http://developer.android.com/guide/topics/resources/localization.html

答案 2 :(得分:1)

尝试使用“ lang”参数。

例如:

$query = array('location' => 'bafra,cy','format' => 'json','u' => 'c','lang' => 'tr-tr',);

源:https://developer.yahoo.com/social/rest_api_guide/web-services-i18n.html

相关问题