3

I am using the weather place finder and yahoo weather api. By default, I am getting the response in US-ENGLISH language. I want to change the response in KOREAN language.

Please share the ideas.

Om Narain Shukla
  • 361
  • 1
  • 4
  • 12

3 Answers3

5

After visiting So many sites, I got to know that Yahoo does not support multiple languages for the weather API response.

Om Narain Shukla
  • 361
  • 1
  • 4
  • 12
  • 1
    Agree with you, Yahoo only take 2 parameters w (WOEID) and u (unit). As alternative you could build our own database language for weather information and do your own mapping based on weather code. But it would be extra work to do (must also consider unicode and multi languages support for SQLite DB), hard to maintain and extra IO cost for DB lookup. Perhaps you could consider other weather API services? – stuckedunderflow Sep 10 '12 at 08:44
1

Yes, I think Yahoo Weather does not support multiple languages, Yahoo only take 2 parameters w (WOEID) and u (unit).

But you could consider use strings.xml to map the weather code.

For example in values/strings.xml you put not available, then in values-fr/strings.xml you put pas disponible

You need to do this for all Yahoo Weather code from 0 - 3200. And put another folder values-[country_code] for another language. Go further reading here, http://developer.android.com/guide/topics/resources/localization.html

stuckedunderflow
  • 3,551
  • 8
  • 46
  • 63
1

Try 'lang' parameter.

for example:

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

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

amseager
  • 5,795
  • 4
  • 24
  • 47
aecsahin
  • 31
  • 4