Results 1 to 4 of 4

Thread: Multi-Language Site - Best Way

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Multi-Language Site - Best Way

    Hi,
    Not strictly a PHP question, but seeing I will be using php from now on ....

    I want to create a pretty simple site, but it will be in 3 languages (en, zh, ja).

    Now there's obviously a few ways to go like load all your values from the database. Or create a version of the site in each language. Or use php scripts to decide between different text values according to the user's current language.

    I'm trying to figure out what is the best way to go about, or at least, how it's done out there. My asp.net site uses a combination of the above 3, including resource files. Did not end up that well, suffering from the disadvantages from each.

    Database.....hit on performance
    1 "site" per language....hard to maintain
    resource files/hard coded text with decision making function....code get's pretty messy.

    Any input welcome...

    ps. Using every free minute to study php/mysql/apche now. Any pointers to good resources, advice, warnings also welcome.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Multi-Language Site - Best Way

    Resource files/database, but statically exported (i.e. an exporter script creates and saves all language versions and the web server serves them statically, or with reduced script load). I was just part of a project that created a huge site this way, and it works really well (aside from the insane additional requirements we had).
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: Multi-Language Site - Best Way

    My knowledge is minimal, i mean really crap

    What i would do is make an include php file, with an array of the keyworks, such as link titles, headers etc.

    Then just call them back afterwards. This can be done in your selected, or even any language.

    Failing that http://google.com/translate_t

  4. #4

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Re: Multi-Language Site - Best Way

    lol..Home-Baked resource files. I thought of that too.
    One can come up with so many ideas, but what I'm after is the way it's done out there.
    Seems it all depend on the site you are building. For instance this one for my wife, works pretty good with a page version per language. That for instance would not work with my company's site.
    Thanks for the Google Translation link...never knew of it..used babelfish till now.
    Install and Configure Eclipse For both Java and PHP development
    Accessible Ajax/jQuery Forms Degrade gracefully with JavaScript Disabled

Posting Permissions

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



Click Here to Expand Forum to Full Width