Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Website translation for other languages

  • 19-09-2009 10:15am
    #1
    Registered Users Posts: 156 ✭✭


    I'm planning to translate my site into French & German and maybe Spanish also.

    I plan to do full translations, meta data, file name's etc so we can rank high in the search engines of those countries.

    I can appreciate it’s not an easy question to answer, but what is the best way to go about doing this?

    A separate root folder for each translation? Links at the same point on each page to the other translations?

    I have a few contacts that will do the translations for me ok.

    Any pointers/advice greatly appreciated.


Comments

  • Closed Accounts Posts: 417 ✭✭Tim M-U


    Hi there!, I hope this will be of benifit to you:

    *Google have a tool called 'Google Translate', the tool includes translation into Spanish, French, German and many more!. The link for this tool: http://translate.google.com/translate_tools .
    The html code for this Tool widget: [HTML]<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/translatemypage.xml&up_source_language=en&w=160&h=60&title=&border=&output=js"></script>[/HTML]


    *You can translate english text into many languages and translate a webpage here: http://babelfish.yahoo.com/


  • Closed Accounts Posts: 417 ✭✭Tim M-U


    Also, you will have to do the translatation manually for the buttons as far as i know.


  • Registered Users, Registered Users 2 Posts: 569 ✭✭✭none


    I have some experience with the same content in different languages. I suppose, you have to either have a home page with nothing but some logos and links to localized versions (all languages are treated equal) or a home page in your default language with respective links to "translate" the content. How you structure it is up to you but I normally use subfolders named after 2 char ISO codes either for country or language (e.g., /uk for English version, /es for Spanish, etc.).
    The "translation" can be done with either hardcoding the relevant links (e.g., in /uk/about.htm you explicitly put something like <a href="/es/about.htm"><img scr="spanish_flag.jpg"></a>) or doing it on the fly with server-side or client-side programming.
    With metadata, if you have mixed content on a page, you can use something like <meta http-equiv="content-language" content="en,es"> or
    <meta name="language" content="en,es"> but if your pages are structured well (in other words, only one language per page), you may be better off with specifying only that language.


  • Registered Users, Registered Users 2 Posts: 6,522 ✭✭✭daymobrew


    I suggest copying all the files into each of the sub dirs e.g. en, es, fr, de etc.
    All url paths would be relative and identical in all files.
    The top of each page would be a link to the same page in other languages. This could be achieved with a server side language so you would just include the function in each file. Maybe something like this (untested code):
    [PHP] $langs = array( 'en', 'es', 'fr', 'de' ); # Add more if necessary.
    $this_file = basename( $_SERVER; # Get 'file.php' from '/en/file.php'.

    #TODO: Maybe determine current language and exclude its link in loop below.
    foreach ($langs as $lang) {
    printf( '<a href="/%s/%s">%s</a>', $lang, $this_file, $lang );
    }[/PHP]


  • Registered Users, Registered Users 2 Posts: 379 ✭✭TheWaterboy


    Some good advice from other posters there regarding file structure etc. However I wouldnt necessary have a separate codebase for each language as its a nighmare manage the code then. Use a database to store the translations and based on the language set display the appropriate text.

    I wouldnt personally use Google translations - Yes they are fine but on some ocassions the translation isnt gramatically correct. A translation company, though expensive might be a better idea. Alternatively find a native speaker to do it.

    Setting up sub domains is also a very good idea from an SEO point of view. As well as having your site translated you want it to rank well on foreign search engines.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 569 ✭✭✭none


    Yes, subdomains look nicer but a bit more difficult to deploy and configure.
    I prefer to have sites as independent of the hosting platform as possible so this results in 1) some abuse of client-side scripting and 2) somewhat redundant HTML. But they can be freely moved between different hostings with minimum effort.


  • Registered Users Posts: 156 ✭✭kgpixels


    Thanks for all the feedback so far folks. It looks like it will be more complicated than I thought.
    Server-side or client-side programming is way over my head! Need to research that a bit.
    I'm thinking folders for each language and links on each page to each other translation. Will try and keep it simple as possible. A nice project for the long evenings ahead ;)


  • Registered Users, Registered Users 2 Posts: 569 ✭✭✭none


    You don't have to use any programming at all if you're going ahead with hardcoding links as I suggested. It should be relatively easy to do. The only issue may arise if you need to make changes and without programming you'll have to do it in all pages while with programming you could just change one variable. It's no big deal if you have 10+ pages but becomes an issue when you go beyond a few dozen.


Advertisement