Translate Widget

Update! Version 2.0 is here: Translate Widget 2.0

Translate WidgetSo, I’ve completed my first bona-fide Wordpress Plugin :)
It’s one of those newfandangled widgets, and it adds little flags to your sidebar, which will take you to a translation of the current blog page. It uses google translate, but removes the frame, so it looks quite nice! Once you’re in one language, you can browse around the blog, and everything stays translated. You can just click on the English flag to get back to the original language. You should see it on my sidebar now, and you can give it a trial run. Then, if satisfied, download it here:
Translate Widget
The zip includes a /flags/ folder, and a translate.php file. Both need to be placed in the /wordpress/wp-content/plugins/widgets/ folder. If you want to change the English language flag from the default American to either the British or Canadian (as I have!) flags, they are included, just rename flag_ca.gif, or flag_uk.gif to flag_en.gif. Now you can just go to the widget’s options.

Donations

If you appreciate my plugins, and feel compelled to spread some love, I would certainly appreciate it. No obligation though, of course.


Comments, tips, or problems are welcome, just leave a comment here, or send me an email (Address is in the sidebar.)

Do enjoy!

Update on June 14, 2006: The plugin now supports Arabic, since Google has added that to their list of supported translations. This brings the total to 9 languages.
To those not familiar with Wordpress Widgets, you need to have the Widgets plugin installed before you can use my widget.

197 Comments

Pages: « 1 [2] 3 4 5 6 7 » Show All

  1. yauheni

    hi, is it too much to ask to add the Russian language to the list? i am a newbie in this, but having a Russian translation on my blog will be very very appreciated
    thanks

  2. […] The Translate Widget, by Trevor Creech, is sitting in my sidebar.  It’s an image button, with clickable flags, that translates (using Google Translate) your Web page into the applicable language.  Use the English flag to get back to English.  Try it out! […]

  3. Zac

    My blog is in French and I would like to set the default language as French to get a translation from French to another language.
    Can you help me further.

  4. Wilco

    Hi Trevor,

    It looks like a very good thing to have on my weblog, but I’m a rookie with plugins. I was able to activate it, but how can I add it to my sidebar?

    thanks in advance for your help.

  5. I am master of Techpush:)

    I am pleased to see your comment about changing Translate Widget to meet Chinese blog, I am looking forward to the next version.

  6. Translate shows the flag vertically and not hortizally

  7. Stahn

    You should modify the plugin to work as the Search default widget.

    So the only thing we must do is add a Text widget with the text that we want.

  8. […] For now, I will explain the headline here: This is how Google translates the title of my site– my name is Shawn Rider, yet French Google thinks “rider” should be translated. I love it. Thanks to Trevor Creech, who created the Translate widget for Wordpress. You can click the flags in the sidebar and get this site in your preferred language (well, of the few that are readily translated online, but that’s not Mr. Creech’s fault). […]

  9. […] El blog en varios idiomas. Con lo que nos gustan las banderitas! Translate Widget rockea. […]

  10. Geoff Green

    I also was having problems with the flag images appearing vertically. I solved the problem by adding the following CSS definition:
    #translate img {display: inline;}

  11. Wow, talk about a response!
    Thanks to all of you for the comments, suggestions, and links! My traffic doubled over the past week. Not that I have a lot of traffic, but that’s still awesome. I believe I got back to everyone who needed a response by email. If you still have a question outstanding, let me know.
    Geoff, thanks for the easy CSS fix.

  12. Sam

    Works great and less filling!

    I did get some complaints while auditing my pages about undefined width and height for the flag images, so I went in and added them e.g.;
    echo "” ?>’);

  13. leopardy

    Looks like a cool and useful widget. Have some of the little bugs mentioned above been corrected? Is the downloadable version up-to-date? I downloaded the file but there was no text file, no instructions.

  14. Leopardy,
    There are really no urgent changes needed to the widget, just the CSS styling to make sure the flags are horizontal, and the width/height attributes on the images. All the instructions you should need to install the widget are in the post above. As I mentioned in my latest post, I\’m not going to work on web stuff until July, so I\’ll make those changes, and hopefully some bigger ones then. Some things I hope to implement then:

    • Translation starting from other langauges, not just English
    • Correct conversion of the Wordpress fancy quotes and such
    • Add a readme file to the zip

    Anyone have any other suggestions?

  15. pol

    Hi
    Im spanish, and to use this widget I couldnt change the language to spanish, because the widget tried to translate my text from english (my text is spanish) to english, and it didnt do nothing.

    the solution is that i changed in translate.php this:

    echo "<a title=\"$langname\" style=\"margin-left:1px; margin-right:1px;\" href=\" http://www.google.com/translate?hl=en&ie=UTF8&langpair=en%7C$langcode&u=$url\"><img src=\"$image\" alt=\"$langname\" /></a>";

    to this:


    echo "<a title=\"$langname\" style=\"margin-left:1px; margin-right:1px;\" href=\"http://www.google.com/translate?hl=es&ie=UTF8&langpair=es%7C$langcode&u=$url\ "><img src=\"$image\" alt=\"$langname\" /></a>";

    changing the language coming from and translating from Google. I think it should be explained in a Readme file.

    I also changed
    $langname='English';
    $langcode='en';

    to:
    $langname='Español';
    $langcode='es';

    and
    $languages = Array('Francais' => 'fr', 'Deutsch' => 'de', 'Español' => 'es', 'Italiano' => 'it', 'Portugese' => 'pt', 'Japanese' => 'ja', 'Korean' => 'ko', 'Chinese' => 'zh-CN');
    to:
    $languages = Array('Francais' => 'fr', 'Deutsch' => 'de', 'English' => 'en', 'Italiano' => 'it', 'Portugese' => 'pt', 'Japanese' => 'ja', 'Korean' => 'ko', 'Chinese' => 'zh-CN');

    and then there’s no need to change the .gif flag’s names, you know? i could’nt repair my problem changing the .gifs names

    well i hope this is usefull to you, and explained in future versions. kind regards!

  16. […] Widgets allow you to edit blog sidebars without having to tinker with the code—a wonderful solution for amateurs like me. I organized the layout of both of these sidebars in a matter of minutes using widgets. (This is what the Sidebar Widgets screen looks like.) And thanks to developers like Trevor Creech I’m able to add features like the translate function on the left in a matter of minutes. […]

  17. Thomas

    great widget trevor! works perfectly! is there anyway to have it NOT display the google translating page after clicking on a flag? i’d rather the page stay static and then display the translated page when it’s done. surely someone here can solve this. thanx!

  18. James Choung

    Hi , I’m just a beginner at Wordpress — and I was wondering where you put that command:

    #translate img {display: inline;}

    so that the flags are drawn horizontally?

  19. That’s CSS, so you need to put it in your theme’s CSS file. You can get at this from the Wordpress admin screen, click the presentation tab, then the Theme Editor tab. If you’re not editing style.css, click stylesheet on the right. Then add it to the bottom and click Update File.

  20. Trev, thanks for the speedy reply. I did that, and it didn’t work. Is it because I’m using the Regulus 2.1.3 theme?

  21. Ok, I’ve got it. For the Regulus theme, you need to change what you’re adding to this:
    #translate a {display: inline;}

    That should work.

  22. James Choung

    Hi Trev — thanks! That worked — now the flags are a bit large so that it goes to the second row, but this will do! Thanks again!

  23. James Choung

    Hi trev — thanks again. Yes, now it works perfectly!

  24. […] I have added a really cool translate widget from here. […]

  25. Hi I think this widget is really nice! Is there a way to remove the english flag in the widget? I have one extra flag and it appears in the next row alone. I think this is ugly… You do not have it here.

  26. […] Although it was released in late April, I wanted to remark about Trevor Creech's Translate plugin. This is a nice plugin that adds a simple way for non-english readers to read your site. I noticed some validation complaints concerning a lack of width/height that concerned me because without width/height parameters a page has to wait until an image is loaded to 'format' the rest of the page. I changed the following in wp-content/plugins/translate.php: […]

  27. para que version de wordsprres esta hecho este plugin?

  28. My Translate Widget requires the Widget Plugin, which only runs on Wordpress 2.0+.

  29. Hi

    Your language toolbar is excellent. Please could you do me a big favour??? And add Arabic (Google has an Arabic Beta).

    Mm, I guess the flag should be Saudi Arabia.

    BIG THANKS

  30. Haf

    Thanks for this cool widget, I’ll implement the german version to my site as soon as I find the time to add widget support to my theme.

Pages: « 1 [2] 3 4 5 6 7 » Show All

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>