Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Thanked 1 Time in 1 Post

    language .best way.

    hi guys.
    i wanna discuss what is the best way that worked for you guys when you try to make multilingual website ?

    like you store the language translation in a database ? look up on it .. ? based on cookies ?

    or you simply make a whole new folder that is in different language and would that work better in term of SEO and so on ?


  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    Damn, there was just a discussion on this a few months ago, and I can't remember what it was called >.<
    I use a database method. Each of my 'word' replacements are matched with the corresponding 'phrase' in the database, so it would be something like:
    WELCOME_TEXT => 'Welcome'
    For example. These are chained to language selection and can be selected from the user desired language or from the locale provided by the browser. Still have problems with the correct charsets though, seems to like generating the one to use which may or may not be correct through unicode.
    Then, I prefetch all the values I need in a single query from the database before processing any code. Each included object simply appends to the objects required language variables and then requests from the database where the variable name is IN the collection.
    Langauges are actually pretty easy to do once you get the hang of them, but you are looking at overhead even for a common language set (say english if you expect mainly english users).
    Hope that helps you out!
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


    Posting Permissions

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