Support » Plugin: Awesome Weather Widget » Translation

  • Resolved aprop


    Hi and congrat for the plugin, it’s one of the most easy and beauty ones i have seen.

    I would like to translate the front end language to a language that’s not in the Api, so i would like to translate the “some clouds” to my language (catalan).
    Is there any way to do it?

    Also it would be great to translate the “some clouds” to a icon. That could be a solution.


Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Hal Gatewood


    I’m fairly new to the translation of plugins world, but from what I am learning this plugin can help you with it:

    I hope to play around with it soon so I can answer your questions about translation better.


    Qtranslate is not useful for translating the plugin.
    In my experience qtranslate is great for all the text that I have to publish, but not for the php coded.

    would be great to have a personalizable text area were i can replace the “some clouds” string with the text I wanna show. It s not only translate it, it can be used to personalize it. “be happy its a sunny day” instead of sunny day” 🙂

    Plugin Author Hal Gatewood


    The “some clouds” text is not part of this plugin. That text is returned from the free weather data provided from OpenWeatherMaps. So they would have to translate it on their end.

    So there’s no way to translate it?

    Plugin Author Hal Gatewood


    Not an easy way at this time.

    you can translate most stuff with WPML

    I solved the problem easily!

    Added new variable $desc and added in file awesome-weather.php on line about 230 (after the code COLOR OF WIDGET):

    $desc = $today->weather[0]->description;
    if($desc == “light shower snow”) $desc = __(‘light shower snow’, ‘awesome-weather’);
    if($desc == “shower snow”) $desc = __(‘shower snow’, ‘awesome-weather’);
    and so on

    <div class=\”awe_desc\”>{$today->weather[0]->description}</div>
    <div class=\”awe_desc\”>”.$desc.” </div>

    And he added, in a translation of the description file

    #: awesome-weather.php
    msgid “light shower snow”
    msgstr “your language translate”
    In the language file you translate as desired description for the weather.

    Use it! ))

    Can you explain better the point 3?

    In this phrase in quotes description of weather that gets script parsing weather. I found a few sample phrases and ordered them to file first. That’s it. I could find (with translation into Russian):

    #: awesome-weather.php:305
    msgid “light shower snow”
    msgstr “легкий снежок”

    #: awesome-weather.php:305
    msgid “overcast clouds”
    msgstr “переменная облачность”

    #: awesome-weather.php:305
    msgid “scattered clouds”
    msgstr “рассеянные облака”

    #: awesome-weather.php:305
    msgid “light snow”
    msgstr “легкий снежок”

    #: awesome-weather.php:305
    msgid “broken clouds”
    msgstr “облачно”

    #: awesome-weather.php:305
    msgid “sky is clear”
    msgstr “небо чистое”

    #: awesome-weather.php:305
    msgid “few clouds”
    msgstr “небольшая обачность”

    #: awesome-weather.php:305
    msgid “light rain”
    msgstr “легкий дождик”

    #: awesome-weather.php:305
    msgid “moderate rain”
    msgstr “умеренный дождь”

    #: awesome-weather.php:305
    msgid “snow”
    msgstr “снег”

    #: awesome-weather.php:305
    msgid “haze”
    msgstr “дымка”

    #: awesome-weather.php:305
    msgid “heavy intensity rain”
    msgstr “сильный дождь”

    you have to replace the text between each row msgstr “” symbols on your

    Plugin Author Hal Gatewood


    Just a note. The PRO version is fully translatable at this time:

    Awesome Weather Widget Pro

    However it doesn’t use the same .pot file as the free version, so you would have to retranslate the new PRO .pot file.

    The weather descriptions are based of the WP_LANG variable in your wp-config.php file. I hope to make the FREE version completely translatable in the coming months as well.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Translation’ is closed to new replies.