Grow your CSS skills. Land your dream job.

Multi-Langage website

  • # February 16, 2009 at 4:56 am

    I’m not sure if I have posted this in the right place so feel free to move it if it should be better somewhere else.

    Here is my problem:

    I have quoted someone for a fairly simple 10 page website, they seemed happy with the quote, there isn’t much dynamic content at all so I gave them a pretty good price I think.
    However they have just emailed me saying that they need the website in both English and Spanish and would like me to adjust the quote accordingly.

    What is the easiest/best way to do this? I was probably going to use WordPress for the whole site, does that make things easier?

    Thanks in advance!
    Mike

    # February 16, 2009 at 7:18 am

    As far as I am aware, there are two options when doing a plain XHTML/CSS website:

    1) A portal page with a language selector, where each language is in a seperate folder on the server
    2) A ‘change language’ button on each page which will swap ‘index.htm’ to ‘index_es.htm’ for example

    Is there a better/easier way to do this?

    # February 16, 2009 at 9:02 am

    That’s a tough one.

    If I had to get something up and running by this weekend I personally would probably attempt two wordpress installations and have the spanish version of the site on it’s own sub domain es.mywebsite.com.

    I have no doubt there is a far easier way of doing this using PHP and someone has probably already done it. But that would take a lot of time to find, evaluate, adjust etc etc. Depends on your budget and how much time you’ve got.

    # February 16, 2009 at 11:20 am

    Mike, you’ve hit the nail on the head for a site that is outside of a CMS. Within a CMS, however, I think you may have to, as acialk suggested, have a completely different install. The problem here of course is flipping between a spanish post and an english one.

    # February 17, 2009 at 11:24 am

    Thanks for your replies.

    I don’t think the site really needs a CMS, other than to make it easy for the customer to edit later.

    The only changing data will be a page that is changed every month, last months contents will be moved to a different archive type section. And there will be a counter that will have to be updated manually(maybe from a text file that both languages can access?).

    Other than that, pretty much all the site will be static content. Hence why I thought it would be best to have two seperate sites in two seperate folders/subdomains.

    # February 17, 2009 at 2:24 pm

    I have not read all of this:

    http://webtips.dan.info/language.html

    also, if you want, just thinking here never tried or tested….

    you could add in a peice of php to test, the language preference, and have the php load from a certain file.
    http://blog.sorcellerieweb.net/post/200 … s-with-PHP

    http://svn.gna.org/viewcvs/clansuite/we … iew=markup

    ………………………………………..

    If your going to have a static site but for both languages, then I would have them set apart in different directories: http://www.abc.com/en http://www.abc.co.uk/es

    but have a generic index.php to start with:
    in that test for header language and include the correct directory for the language: e,g:
    $lang = substr($_SERVER, 0, 2);
    if($lang == "es"){
    include(‘www.abc.com/es/index.php’);
    }
    else if($lang == "en"){
    include(‘www.abc.com/en/index.php’);
    }

    ik

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".