SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict Shockt's Avatar
    Join Date
    Jan 2005
    Location
    California
    Posts
    360
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Building a multi-language site

    I'm stuck. I need to create an Italian mirror of the main pages on this site:
    http://www.caribbeanislandbrokers.com
    I was given the Italian translation of the pages I need to mirror, I just can't think of a way to do it efficiently without causing some SEO trouble. I would like to keep a similar link structure but if a page doesn't have an Italian translation, it should default to the English version of that page without creating duplicate content.

    Any ideas?

  2. #2
    SitePoint Zealot
    Join Date
    May 2007
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    I was solving it the following way (but I'm no expert...)

    setting up various Domains for various languages that point on the same php files ()example.com, example.de, example.it...)

    Then the following function
    function dot() {
    $array = explode('.', $_SERVER['HTTP_HOST']);
    $dot = $array[1];
    return $dot;
    }

    If this function will return 'com' you will give out the English text, if it is 'it', you give out the Italien text. Save all text that has to be translated in a database, then you can set up other languages easily. Hope I could help

  3. #3
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,650
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Shockt,

    Browsers (and computers) will identify their language(s) of preference in the headers that are sent. Checkout "Content Negotiation" at Google and that'll lead you to http://httpd.apache.org/docs/2.0/con...gotiation.html (Wikipedia merely copies a subset of this information).

    In other words, read the language in the HTTP header and redirect accordingly.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  4. #4
    SitePoint Member
    Join Date
    Jun 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello.
    I think that you can setting a change the language html. And if you have some problemms, let me know . I can help you.
    the last rose of the summer italian translation


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
  •