如何在 android 中更改 OpenWeatherMap api 中的描述语言
How to change description language in OpenWeatherMap api in android
在我的应用程序中,我想使用 OpenWeatherMap api 显示城市 天气 信息。
为此,我想将 description language 更改为 farsi 。
我在 OpenWeatherMap 帮助下得到了这个,我在下面写了 URL :
http://api.openweathermap.org/data/2.5/forecast/daily?q=tehran,ir&cnt=16&units=metric&lang=Farsi-fa&appid=1487dd8a93bfd85d278d9ayty875ghyy
但是给我看这个信息:
{
"city": {
"id": 112931,
"name": "Tehran",
"coord": {
"lon": 51.4014,
"lat": 35.7006
},
"country": "IR",
"population": 7153309
},
"cod": "200",
"message": 1.31599,
"cnt": 16,
"list": [
{
"dt": 1522310400,
"temp": {
"day": 29.68,
"min": 9.13,
"max": 29.68,
"night": 9.13,
"eve": 19.21,
"morn": 29.68
},
"pressure": 749.02,
"humidity": 67,
"weather": [
{
"id": 801,
"main": "Clouds",
"description": "few clouds",
"icon": "02d"
}
],
"speed": 1.42,
"deg": 211,
"clouds": 20
}
}
在OpenWeatherMap help say if add this code to URL lang=Farsi-fa
change this line "description": "few clouds"
语言.
我添加了语言代码但没有更改描述语言!
我怎么可以呢?请帮助我
应该只是语言代码:
lang=fa
http://api.openweathermap.org/data/2.5/forecast/daily?q=tehran,ir&cnt=16&units=metric&lang=fa&appid=1487dd8a93bfd85d278d9ayty875ghyy
"description":"بارش خفیف باران"
在我的应用程序中,我想使用 OpenWeatherMap api 显示城市 天气 信息。
为此,我想将 description language 更改为 farsi 。
我在 OpenWeatherMap 帮助下得到了这个,我在下面写了 URL :
http://api.openweathermap.org/data/2.5/forecast/daily?q=tehran,ir&cnt=16&units=metric&lang=Farsi-fa&appid=1487dd8a93bfd85d278d9ayty875ghyy
但是给我看这个信息:
{
"city": {
"id": 112931,
"name": "Tehran",
"coord": {
"lon": 51.4014,
"lat": 35.7006
},
"country": "IR",
"population": 7153309
},
"cod": "200",
"message": 1.31599,
"cnt": 16,
"list": [
{
"dt": 1522310400,
"temp": {
"day": 29.68,
"min": 9.13,
"max": 29.68,
"night": 9.13,
"eve": 19.21,
"morn": 29.68
},
"pressure": 749.02,
"humidity": 67,
"weather": [
{
"id": 801,
"main": "Clouds",
"description": "few clouds",
"icon": "02d"
}
],
"speed": 1.42,
"deg": 211,
"clouds": 20
}
}
在OpenWeatherMap help say if add this code to URL lang=Farsi-fa
change this line "description": "few clouds"
语言.
我添加了语言代码但没有更改描述语言!
我怎么可以呢?请帮助我
应该只是语言代码:
lang=fa
http://api.openweathermap.org/data/2.5/forecast/daily?q=tehran,ir&cnt=16&units=metric&lang=fa&appid=1487dd8a93bfd85d278d9ayty875ghyy
"description":"بارش خفیف باران"