Do You Know A Program That Can Extract A Text From PHP!

Discussion in 'PHP' started by dikozall, Oct 29, 2008.

  1. #1
    Hi guys!

    I am not sure that the word is "extract", but here is what i want to do. I have one script that i want to translate to my language. The problem is that i have to open every file to search the text (sometimes i translate things that are not the text and everything dies) and to translate it.

    I need a program that scans the php files, give me only the text (English in this case) and the option to translate it. Or just to scan the PHP file and to highlight the text that can be translated.

    In case that you didn't understand i am talking about everything that the user see when comes on the page. Like to translate a WP theme or something.

    Thanks to all in advance.
     
    dikozall, Oct 29, 2008 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    To answer your question; NO.

    To try and help you a little bit:

    Most things that need translating are preceded by Echo or print and the item is in single or double quotes.

    Things that are pulled from the database or the config file are in the language you enter them in.

    I hope this helps a little bit. :)
     
    Colbyt, Oct 29, 2008 IP
  3. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #3
    Hey can you go into a bit more detail? Is it similar to the thing implemented on my site (although it's only translated by a machine, so it's fairly poor translation.)

    i.e.:

    Normal site: http://danltn.com
    On-the-fly spanish version: http://es.danltn.com etc

    Is this the sort of thing you mean or... ?
     
    Danltn, Oct 30, 2008 IP
  4. dikozall

    dikozall Peon

    Messages:
    108
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Dan this is exactly what i want to do. The problem is that the script that i have for translating is huge and as i said i sometimes translate things that are not text but code. :)
     
    dikozall, Oct 30, 2008 IP
  5. minervait

    minervait Peon

    Messages:
    85
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    you want us to read the page and show the text and then you will neeed them translated. I need more information from you to advise a perfect solution.

    Minerva Infotech provide the low and cost effective web solutions– website design and development, custom web application development, advanced web programming.

    Visit minervait.com
     
    minervait, Oct 31, 2008 IP