Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Sep 29th, 2011  |  syntax: None  |  size: 2.36 KB  |  hits: 180  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if (!function_exists('replace_weather')) :
  2.     function replace_weather($content) {
  3.                 $content = str_replace('Chance of Flurries', 'possibile tempesta di neve', $content);
  4.                 $content = str_replace('Chance of Rain', 'possibile pioggia', $content);
  5.                 $content = str_replace('Chance of Freezing Rain', 'possibile pioggia ghiacciata', $content);
  6.                 $content = str_replace('Chance of Sleet', 'possibile nevischio', $content);
  7.                 $content = str_replace('Chance of Snow', 'possibile neve', $content);
  8.                 $content = str_replace('Chance of Thunderstorms', 'possibili temporali', $content);
  9.                 $content = str_replace('Chance of a Thunderstorm', 'possibile temporale', $content);
  10.                 $content = str_replace('Clear', 'sereno', $content);
  11.                 $content = str_replace('Mostly Cloudy', 'molto nuvoloso', $content);
  12.                 $content = str_replace('Partly Cloudy', 'parzialmente nuovoloso', $content);
  13.                 $content = str_replace('Cloudy', 'nuvoloso', $content);
  14.                 $content = str_replace('Flurries', 'tempesta di neve', $content);
  15.                 $content = str_replace('Fog', 'nebbia', $content);
  16.                 $content = str_replace('Haze', 'foschia', $content);
  17.                 $content = str_replace('Mostly Sunny', 'molto soleggiato', $content);
  18.                 $content = str_replace('Partly Sunny', 'parzialmente soleggiato', $content);
  19.                 $content = str_replace('Freezing Rain', 'pioggia ghiacciata', $content);
  20.                 $content = str_replace('Rain', 'pioggia', $content);
  21.                 $content = str_replace('Sleet', 'nevischio', $content);
  22.                 $content = str_replace('Sunny', 'soleggiato', $content);
  23.                 $content = str_replace('Thunderstorms', 'temporali', $content);
  24.                 $content = str_replace('Thunderstorm', 'temporale', $content);
  25.                 $content = str_replace('Unknown', 'n/a', $content);
  26.                 $content = str_replace('Overcast', 'coperto', $content);
  27.                 $content = str_replace('Scattered Clouds', 'parzialmente coperto', $content);
  28.                 $content = str_replace('Monday', 'lunedì', $content);
  29.                 $content = str_replace('Tuesday', 'martedì', $content);
  30.                 $content = str_replace('Wednesday', 'mercoledì', $content);
  31.                 $content = str_replace('Thursday', 'giovedì', $content);
  32.                 $content = str_replace('Friday', 'venerdì', $content);
  33.                 $content = str_replace('Saturday', 'sabato', $content);
  34.                 $content = str_replace('Sunday', 'domenica', $content);
  35.                 $content = str_replace('Today', 'oggi', $content);
  36.                 return $content;
  37.         }
  38.         add_filter('wp_wunderground_forecast', 'replace_weather');
  39.         endif;
  40.