How to translate a database?

Discussion in 'Programming' started by MyArtGallery, Mar 10, 2011.

  1. #1
    Hi

    I have a php website that is using a database. I want to translate the website in 5 languages. I know how to translate the text inside the html but how can i have the database translated? I don't want to have 5 databases. What is the general method used to translate a database? Should I have multiple databases for this..or is there a php command?
     
    MyArtGallery, Mar 10, 2011 IP
  2. Aquarezz

    Aquarezz Notable Member

    Messages:
    3,009
    Likes Received:
    69
    Best Answers:
    0
    Trophy Points:
    225
    #2
    Can't you just add a new table with a short prefix for the languages? I mean, names shouldn't be translated and all, but just for descriptions etc.
     
    Aquarezz, Mar 10, 2011 IP
  3. ACME Squares

    ACME Squares Peon

    Messages:
    98
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    There's really no automatic way of doing this. You'll need a table for each language.
     
    ACME Squares, Mar 10, 2011 IP
  4. MyArtGallery

    MyArtGallery Active Member

    Messages:
    418
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Thank you!. Then I'll need to add separate tables for them.
     
    MyArtGallery, Mar 10, 2011 IP
  5. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #5
    To be honest, it depends, it isnt as simple as translating everything or creating duplicate tables.

    What is the site? What is contained within the database? Sometimes you'd want to duplicate tables, other times you simply want to add a language column in the table, some tables need no change because they are language independant (eg a shopping cart table)
     
    AstarothSolutions, Mar 10, 2011 IP
  6. windy

    windy Active Member

    Messages:
    1,093
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #6
    usually you can add some language columns
     
    windy, Mar 12, 2011 IP