I used GoogleWeather plugin of Dirk Hoeschen (feenders.de) for our project.
It worked well, but I had a problem when we need to do website translations , because that plugin was made as one language version.
Therefore I add some code, where I used variable of selected language $_GET['lang'] as dynamic value to call google weather Webservice. If it’s empty – there is used language from config.
There were some problems with charset (UTF-8 vs webservice) – so I did special function that replaces characters in output. Feel free to add next chars if needed.
function _replace($string = ”) {
$string = str_replace(“è”,”č”, $string);
$string = str_replace(“U”,”U”, $string);
$string = str_replace(“»”,”ť”, $string);
$string = str_replace(“¾”,”ž”, $string);
$string = str_replace(“ï”,”ď”, $string);
return $string;
}
you can download plugin here: googleweather-v0.9-MultiLanguage
Tags: google weather, multilang