how to import text file contain multilanguage text into mysql using php ?

Discussion in 'PHP' started by ramysarwat, Oct 29, 2010.

  1. #1
    how can i import text file contain multilanguage text into mysql using php where every language is in different charset ?
     
    ramysarwat, Oct 29, 2010 IP
  2. leh

    leh Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    By using iconv (it's in the php docs) you could convert the text to utf8. After that you should have no problem storing it anywhere.
     
    leh, Nov 1, 2010 IP
  3. silviuks

    silviuks Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you want to insert text according to it's language?
     
    silviuks, Nov 1, 2010 IP
  4. seotraining

    seotraining Active Member

    Messages:
    511
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    70
    #4
    You can select data type text in the mysql table and you will be able to insert those characters in it
     
    seotraining, Nov 2, 2010 IP
  5. ramysarwat

    ramysarwat Peon

    Messages:
    164
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yes according to it's language
     
    ramysarwat, Nov 4, 2010 IP
  6. silviuks

    silviuks Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you have your text somehow formated to differentiate the languages, should be easy. Also, if you can alter your text file you also can format it to be easy to use. Right now, I'm thinking to something like this:
    
    [en] your text block in English[/en]
    [fr] your text block in French[/fr]
    .
    .
    .
    
    Code (markup):
    What is between [en] and [/en] goes to English part, what is between [fr] and [/fr] goes to French part, and so on ...
     
    silviuks, Nov 4, 2010 IP
  7. backlinkneeded

    backlinkneeded Member

    Messages:
    285
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #7
    how can we add more languages, like 50? please explain. thanks
     
    backlinkneeded, Dec 22, 2010 IP