WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Weather Forecast – WP Wunderground] How to translate WP underground (easy)

[Resolved] [Plugin: Weather Forecast – WP Wunderground] How to translate WP underground (easy)

  • I was able to translate this plugin into another language.

    Just know that to see the changes right away, you need to turn off the cache of the plugin, but after you see it’s working, turn the cache on, you’ll see the changes the next day.

    I haven’t translated all the weather messages but you can add more easily, just paste this code in the function build_forecast, after :
    $label = $this->format_date($date, $todaylabel, $datelabel);
    and before :
    $tablehead .= “\n\t\t\t\t\t\t\t”.'<th scope=”col” width=”‘.$colwi….

    if      ( $label == 'Sunday' )    { $label = 'Dimanche'; }
    else if ( $label == 'Monday' )    { $label = 'Lundi'; }
    else if ( $label == 'Tuesday' )   { $label = 'Mardi'; }
    else if ( $label == 'Wednesday' ) { $label = 'Mercredi'; }
    else if ( $label == 'Thursday' )  { $label = 'Jeudi'; }
    else if ( $label == 'Friday' )    { $label = 'Vendredi'; }
    else if ( $label == 'Saturday' )  { $label = 'Samedi'; }
    
    if      ( $conditions == 'Clear' )          { $conditions = 'Clair'; }
    else if ( $conditions == 'Partly Cloudy' )  { $conditions = 'Ciel voilé'; }
    else if ( $conditions == 'Overcast' )       { $conditions = 'Nuageux'; }
    else if ( $conditions == 'Chance of Snow' ) { $conditions = 'Possibilité de neige'; }

    http://wordpress.org/extend/plugins/wunderground/

  • The topic ‘[Resolved] [Plugin: Weather Forecast – WP Wunderground] How to translate WP underground (easy)’ is closed to new replies.