3
Vote

Add flexibility to forecast languages

description

I just have a little suggestion for you to improve the code.
The method “public static Uri GoogleWeatherFeedUrl(LanguageCode languageCode)” uses different urls according to the languageCode passed as a param. You could use the same url instead:
http://www.google.com/ig/api?weather=milano&hl=ar
http://www.google.com/ig/api?weather=milano&hl=en
http://www.google.com/ig/api?weather=milano&hl=it

I’d avoid hardcoding the languageCodes (enum LanguageCode) but I’d rather delegate Google to use the suitable code, just passing the 2 chars culture info (http://www1.cs.columbia.edu/~lok/csharp/refdocs/System.Globalization/types/CultureInfo.html)

comments