SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict Zapppa's Avatar
    Join Date
    Aug 2009
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Language Change Facility

    Hello

    I like this language change feature on this website:
    http://www.schneider-electric.com/si.../index.cfm/uk/

    In the top middle there is a link to change your country. What this does is effectively change the language of the website... are there any reliable tools for me to achieve this?

    I have a website which has around 30 pages.. however it is not in a CMS/Blog platform, it is all hand coded.. can I still get a decent plugin?

    Any thoughts on this is much appreciated.

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    9 Thread(s)
    Hi there,

    There's a nice little jQuery plugin called the "Polyglot Language Switcher" which helps you create a dropdown with all of the languages your site supports, plus flag.
    You can check it out here: http://www.ixtendo.com/polyglot-lang...jquery-plugin/

    Also a quick Google search turns up a bunch more results: http://www.google.com/search?q=jquery+language+switcher

    Out of intrest, how many different languages do you want to support?
    At work we have the option to switch between English and German. To do this the user just clicks on a flag in the top right hand corner of the page.
    We title all German files as normal, e.g. index.html and all English files with a "_en" suffix, e.g. index_en.html.
    As long as both the German and English version of the file are in the same directory, this works just great.

  3. #3
    SitePoint Addict Zapppa's Avatar
    Join Date
    Aug 2009
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply

    I would need Portugese, French, German, Italian, Spanish and possibly Chinese.

    Do you have to manually code each page with each translation?
    It would be very challenging to have to keep on top of each language as the website grows, do any of the translations work automatically?

  4. #4
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    9 Thread(s)
    Hi there,

    There isn't a plugin out there that will translate your webpage for you, if that's what you're asking.
    You could always use Google Translate to do this, but the translations are a bit iffy.

    What might be interesting for you however, is i18n.
    This technique uses configuration files to store translations of commonly used words or phrases and uses various methods to output the correct translation depending on the locale.
    It is supported in most major frameworks, e.g. Ruby on Rails, as well as in WordPress, PHP and JavaScript.

    Here are two more useful links:
    PHP: http://stackoverflow.com/questions/6...le-php-website
    JavaScript: http://stackoverflow.com/questions/9...lient-side-use

    HTH


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •