Viewing 4 replies - 1 through 4 (of 4 total)
  • The plugin has translation available. You’ll have to create a translation file specific to your locale and upload it to plugins/wp-weather/localization

    There should be an example in that directory for you to follow.

    Thread Starter bezbeli

    (@bezbeli)

    Thank you very much
    BTW great plug-in ?? is there a way to insert widget in custom sidebar, short-code doesn’t work?

    <?php weather_display(); ?>

    Hi Matt! i was striving with the plugin last days, and i wanna share a piece of code that may help to the translation issue, i mean especifically in the date when is pulled out from the XML file, i try this and work fine for me.
    I replace this:
    $htmlstring .= __('Forecast for ', 'wp-weather').$day_forecast->day[t] . ', ' . $day_forecast->day[dt].'">';
    for this:
    $htmlstring .= __('Forecast for ', 'wp-weather'). date_i18n('l, j F', strtotime($day_forecast->lsup)) .'">';

    this way, the date get localized according to the wordpress language installed.

    But, dealing with the current conditions code was something else, so i made an array with the values translated and use the “icon” as an index for the array, accesing like this:

    $htmlstring .= '<br />'.$mensajes[(int)$xml->cc->icon].'<br />';

    I was wondering if you know any other “easy” way to do this, through some parameter, for the xoap.weather.com URL, or the forecastrss URL maybe.

    Check out the modifications i made:
    (Spanish) https://crystalblood.wordpress.com/2010/05/07/plugin-wp-weather-en-espanol-para-el-wordpress-mediante-algunos-tweakshacks-weather-com/

    Best Regards!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Is it possible to translate results from wp-weather?’ is closed to new replies.