WordPress.org

Ready to get started?Download WordPress

Forums

Weather Forecast - WP Wunderground
[resolved] How to translate WP underground (easy) (1 post)

  1. Zurd
    Member
    Posted 2 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic