Sign up for PayPal and start accepting credit card payments instantly.

Mencari Bisnis Online?
Link

Thursday, 25 November 2010

Add Google Translator with Flag on Your Blog...

Want to reach wider international audience? What better way to do it than by allowing your readers to read your articles in his or her own language!


Installing a translator on your webpage or blog will do just that. Google translator is the best one.


In this tutorial I will show you how to add a Google translator widget with the corresponding nation’s flag icons.
Here we go...

  1. Login to your to your Blogger account.
  2. Go to Design > Page Elements.
  3. Click Add A Gadget.
  4. In Add A Gadget window, select HTML/Javascript.
  5. Enter the title of your widget e.g. Translate This Page. This is optional.
  6. Copy the code below and paste it inside the window.
  7. Click Save.

Where :
  • SourceLangCode is the code web page original languageTargetLangCode is the code for language you want the page translated into, and InterfaceLangCode is code for Google translator bar language.Where:
  • TargetLangName is the name of targeted language.
  • Replace all those variables with their respective Google language codes and language name. Refer to the table below
    Language nameCodeLanguage nameCodeLanguage nameCode
    AlbaniansqHungarianhuTurkishtr
    ArabicarIndonesianidUkrainianuk
    BulgarianbgItalianitVietnamesevi
    CatalancaJapanesejaAfrikaansaf
    Chinese (Simplified)zh-CNKoreankoBelarusianbe
    Chinese (Traditional)zh-TWLatvianlvIcelandicis
    CroatianhrLithuanianltIrishga
    CzechcsMaltesemtMacedonianmk
    DanishdaNorwegiannoMalayms
    DutchnlPersianfaSwahilisw
    EnglishenPolishplWelshcy
    EstonianetPortugueseptYiddishyi
    FilipinotlRomanianroAfrikaansaf
    FinnishfiRussianruBelarusianbe
    FrenchfrSerbiansrIcelandicis
    GalicianglSlovakskZuluzu
    GermandeSloveniansl
    GreekelSpanishes
    HebrewiwSwedishsv
    HindihiThaith
  • FlagIconURL is the link to the nation flag representing the target language. You can download free flag icons from Custom Icon Design, FamFamFam or MarkFennel.com. Then upload the ones you need to an image host such as Photobucket, Flickr or Picasa. Once uploaded, get the link to each image an use it to replace FlagIconURL.

    I’ve put a class name to the code, so you can easily style the flag if you want. Add the codes below before or after the translator code.


    Here is a working sample of actual translator flags and their codes. The first one translates from English to Indonesian, with English interface. The second one translates from English to Spanish with Spanish interface.
IDES


Enjoy!
  • Share
  • [i]

0 comments:

Post a Comment

Popular Posts

Get Free Gadgets from Xpango - click here
KumpulBlogger
Adsense Indonesia
Get Free Domain at Co.cc - click here
adf.ly - shorten links and earn money!