Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2003
    Location
    Nedervetil, Finland
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Guidelines for multilanguage site

    I'm considering doing a site with at least 2 languages. I want to do it right from the beginning and use CSS and xhtml. I want to separate the text from the layout in some way so I can easily add more languages after a while.
    What's my options here?

    I have an idea to use php like this:

    <?
    if ($_GET["language"] == "swedish")
    {
    include ("swedish.txt")
    }
    ?>

    and call the page with ?language=swedish in the url.
    So the swedish.txt may contain the actual Swedish text of the site. But just have each textblock on one row in the file may not work. It's is better to have some id-tag on the www-page and in the language-file. That way I can change position of the textblock at the site.

    Any other ideas? Can this be done in pure css?

  • #2
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm not up to scratch with PHP but I'm asuming that php code works out the language automatically... but what if you want to view the site in another country where you don't speak the language?

    What I'd do is have essentially two sites where the user can select the language they require. You could still use SSI to import the correct language text file based on the url using php.

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Location
    Essex
    Posts
    146
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes I agree with mark have two sites.
    Danny Hayes
    Under Construction www.hayes-design.co.uk


  •  

    Posting Permissions

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