Google Weather MultiLang plugin for Joomla

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;
}

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

VN:F [1.6.3_896]
Rating: 7.7/10 (3 votes cast)
  • Share/Bookmark

Tags: ,

Leave a Reply

You must be logged in to post a comment.