Language translation using PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bluebox39
    New Member
    • Mar 2006
    • 2

    Language translation using PHP

    Hi guys,

    I need to know if Language translation from English to French is possible using some PHP code or something?

    Thanks. :)
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Well the answer to your question is yes but I'm not sure it's very helpful.

    Language translation is not a simple task, it is tempting to think that when translating a sentence from English to French all you have to do is look up the translation of every word in the sentence and replace it with it's French equivilent. However this is too simplistic a model and a translation of this sort would produce at best a sort of Pigeon French. Some of the problems that need to be over come would be

    1. The translation for a give word does not necessarily have a 1-1 correspondence. For instance what is the translation of the word 'the' into French. The answer is that you can't tell I have not given enough information it will be 'un' or 'une' but which one depends on the context so in order to be able to translate the word 'the' you have to be able to consider the whole sentence (or sentence fragment) in which it occurs.

    2. Word order, French and English do not always use the same that is where you get the nouns and verbs with-in a sentence.

    3. In French they don't always say things in the same way that they are said in English, for instance the translation of "I'm" is "je suis" but the translation of "I'm hungry" is "J'ai faim". Translated back to English literally this is "I have hunger".

    4. Coloquialisms and slang. It is notoriously hard to translate coloquialisms and slang because normally the envolve using words in different context to there normal meaning.

    So to answer your question more fully, it is as possible to write language translation code in PHP as it is in any other programming language which is to say it's a nightmare :D

    Comment

    • bluebox39
      New Member
      • Mar 2006
      • 2

      #3
      Re: Language Translation

      Thanks Banfa :) for the info provided. It was most useful. I would consider using one of the commercial language translation websites available on the internet.

      Appreciate. ;)

      Comment

      • sehhorng
        New Member
        • Apr 2010
        • 1

        #4
        Try http://www.phptranslator.com
        The translation is done in the background through Google Translation.

        Comment

        Working...