I’m fairly new to the translation of plugins world, but from what I am learning this plugin can help you with it: http://ww.wp.xz.cn/plugins/qtranslate/
I hope to play around with it soon so I can answer your questions about translation better.
Hal
Thread Starter
aprop
(@aprop)
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” 🙂
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.
Thread Starter
aprop
(@aprop)
So there’s no way to translate it?
Not an easy way at this time.
you can translate most stuff with WPML
I solved the problem easily!
1.
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
2.
Replaced
<div class=\”awe_desc\”>{$today->weather[0]->description}</div>
on
<div class=\”awe_desc\”>”.$desc.” </div>
3.
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! ))
Thread Starter
aprop
(@aprop)
Can you explain better the point 3?
Thanks.
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):
/languages/awesome-weather-en_EN.po
#: 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
Just a note. The PRO version is fully translatable at this time:
http://halgatewood.com/downloads/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.