adba / OpenWeatherMapAPI

iOS api classes for openweathermap.org
MIT License
256 stars 68 forks source link

Multilingual support #4

Closed walsht closed 11 years ago

walsht commented 11 years ago

Nice work! Good to have the ability to pass in the lang parameter or better have it get the default language from the device and add it to the API request, if it is a supported language.

To get preferred: NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0];

Current supported: English - en, Russian - ru, Italian - it, Spanish - sp, Ukrainian - ua, German - de, Portuguese - pt, Romanian - ro, Polish - pl, Finnish - fi, Dutch - nl, French - fr, Bulgarian - bg, Swedish - se, Chinese Traditional - zh_tw, Chinese Simplified - zh_cn, Turkish - tr

Thanks, Tim

adba commented 11 years ago

Hi. Thanks for the good suggestion.

I've updated the api to version 0.0.5 and added the methods: setLangWithPreferedLanguage and setLang: these method allow you to send a lang parameter.

If you just call the [weatherAPI setLangWithPreferedLanguage]; It does as you have suggested and gets the parameter from the system.

/Adrian

walsht commented 11 years ago

Looks good, thanks.