1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Web Sites in Multiple Languages

Discussion in 'Content Management' started by craigedmonds, Oct 22, 2006.

  1. #1
    I am building a web site, initially in english, that now has to be translated into all the european languages.

    The web site is a mixture of static and dynamic content so a normal web editor to manage each page is not an option. (I have built a few cms's in my time and the usual way is not going to work this time).

    My idea is to create one copy of the site, and on each page of the site put a "placeholder" to the text within a database, so depending on which languages the user chooses, they will see the relevant text pulled from the database and displayed on the page.

    Does anyone have any ideas on how this is "usually" accomplished?

    If i do it the way I have mentioned above, I am guessing that I will need to populate the database with all the english text, drop the placeholders onto all the pages, then give the translators a page so they can enter the foreign text.

    Its a bit of work to set up but I cant think of any easier way.
     
    craigedmonds, Oct 22, 2006 IP
  2. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #2
    When I did this recently I tried to do a bunch of research to figure out the "usual" way to do it and what ways would work best for me. Here is the approach I took, and why.

    At first I used Apache's content-negotiation, however it has several pitfalls which I didn't know how to overcome. The biggest issue with me was that the same page in each language would have the same URL. So the English, French, and Spanish versions of the same page would have the same URL. I wanted separate URLs in order to get all of the languages indexed properly.

    So I ended up literally having different pages for each language for each page. Within my normal directory structure would be a folder for each language, like this:

    English: www.example.com/
    French: www.example.com/fr/
    English: www.example.com/services/
    French: www.example.com/services/fr/

    Then, much like developing single language sites I separated the header and footer and put those files into their own include file. (You could do that with a SSI, PHP include, etc.) There was one include header file and one include footer file for each language which were called by each file in the site based on what language it was.

    That is the approach I took. I had started with the same route you are thinking of by putting all of the text chunks in a database, but I realized something even simpler than that would be much easier and it would keep separate URLs for each language.

    You can see it in action here:
    LWT Translation Services
     
    tflight, Oct 22, 2006 IP