Announcement

Collapse
No announcement yet.

URGENT!!! Get Text from .XML file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • URGENT!!! Get Text from .XML file

    :In english:
    I have a button as a text, but not as a image, and I would like to know if there is a way to change the content of that text from an XML file.
    In other words, in a "menu" (in Spanish) I have 3 buttons: a) introduction b) trousers(or pants) c) products.
    I need that those buttons (in text) be restored by other 3 texts into another language (Portuguese).
    The option will be a)INTRODUCTION into INTRODUÇÃO, b) PANTS into CALÇAS, c)PRODUCTS into PRODUTOS.
    Is there any way to get the text translated that I created in a XML file, to restore that one that it is in the menu?
    How can I do it?
    Thank you.


    :In spanish:
    Tengo un botón hecho en texto, no como imagen, y quisiera saber si existe alguna forma de cambiar el contenido de ese texto desde un archivo .XML.
    En otras palabras, en un menú (en español), tengo 3 botones: a)introducción , b)pantalones c) productos.
    Lo que necesito, es que esos botones (en textos), sean reemplazados por otros 3 textos en otro idioma (portugués).
    La opción a) pasa de ser INTRODUCCION a INTRODUÇAO, la b) de PANTALONES a CALÇAS, y la c) de PRODUCTOS a PRODUTOS.
    Existe alguna forma de obtener el texto traducido de un archivo .XML que creé para que reemplace al que se encuentra en el menú?
    Cómo lo hago?
    Gracias.

    :Em portugués:
    Tenho um botao em formato de texto, nao como imagem, e queria saber se existe alguma maneira de trocar o conteúdo desse texto desde um arquivo XML
    Em outras palavras, em um menú (em español), tenho 3 botoes: a)introduccion, b)pantalones, c) productos
    o que estou precisando, é que esses botoes (em texto), sejam substituídos por outros 3 textos em otro idioma (portugués)
    A opçao a), passa de ser INTRODUCCION a INTRODUÇAO, a b) de PANTALONES a CALÇAS e a c) de PRODUCTOS a PRODUTOS.
    Existe alguma maneira de obter o texto traduzido de un arquivo XML que eu fiz para que sustitua a que está atualmente no menú?
    Cómo faço isso?
    Muito obrigado

  • #2
    Re: URGENT!!! Get Text from .XML file

    Hi brasibrasi. Yes you can do it. But there's no XML specific actions so you'll need to traverse your xml file using a series of clever STRING actions. pretty easy to figure out. Just get the info from your XML file using TEXT FILE > READ and then use some STRING actions to extract your link text then assign it to your text object with a TEXT OBJECT > SET TEXT action.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: URGENT!!! Get Text from .XML file

      Thank you very much!!!

      Comment


      • #4
        Re: URGENT!!! Get Text from .XML file




        Corey Milner
        Creative Director, Indigo Rose Software

        Comment


        • #5
          Re: URGENT!!! Get Text from .XML file

          The part of replace the text of a button with the text included in a line of a TXT file is resolved , but I need the first part that it is the following :confused::
          I need to know how to do in order that when the CD is introduced, it detects the language installed by the user in his machine, to be possible to show the menu in that language.
          The ideal would be to make just one menu, and according to the language that the user has, that button of text would be showed in that language.
          Example:
          A user has as a predetermined language in his PC, Portuguese. Othe user has Hebrew.
          I need to make just one menu and when the CD is introduced, it detects that the predetermined language of the user is Portuguese, and so to charge in the menu a XML file (or TXT) that irt is inside the CD that correspond to that language, and to show the menu made in Portuguese.
          The same has to happen with the user that has the Hebrew language configured, but this time has to show the same menu in Hebrew.
          In other words, when the CD is introduced, it has to detect the installed language in the user's PC, and according to the detected language the menu has to charge a determined XML (or TXT) file.
          Do you understand? Is it possible to do that? How can I do it?
          Thanks a lot!!!

          Comment


          • #6
            Re: URGENT!!! Get Text from .XML file

            Hi. Use %SysLanguage%. http://www.autoplaystudio.com/webhel...sLanguage_.htm

            If you go to the online help files such as above and type in "language" you would find that page. Please take the time to search our knowledge base and online help files for what you need, that's what they're there for and you will find answers instantly, allowing you to get things done faster...

            Corey Milner
            Creative Director, Indigo Rose Software

            Comment


            • #7
              Re: URGENT!!! Get Text from .XML file

              Thank you very much for the help!!!.
              I am sorry to bother you, but i can´t do make this thing work. :o

              When the CD is introduced, it has to detect the installed language in the user's PC, and according to the detected language the menu has to read a determined TXT file.


              *****************
              Is this correct?
              ************************************************** ****************
              Page Properties:
              Actions:
              On initialize


              IF [%Syslanguage%=10]
              %TextFile%=TextFile.Read ["%SrcDir%\10.txt"]
              %TextLine%=TextFile.GetLine ["10.txt",1]
              textObject[Text1].SetText ["%TextLine%"]
              END IF
              IF [%Syslanguage%=9]
              %TextFile%=TextFile.Read ["%SrcDir%\9.txt"]
              %TextLine%=TextFile.GetLine ["9.txt",1]
              TextObject[Text1].SetText ["%TextLine%"]
              END IF
              ************************************************** *****************

              <IR_ACTIONS_LIST>
              <Action name="IF">
              <Type>200</Type>
              <Function>1</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              <Condition>%SysLanguage%=10</Condition>
              </Action>
              <Action name="Read">
              <Type>31</Type>
              <Function>0</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              <Variable>%TextFile%</Variable>
              <FileName>%SrcDir%\10.txt</FileName>
              </Action>
              <Action name="Get Line">
              <Type>58</Type>
              <Function>0</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              <FileName>10.txt</FileName>
              <LineNumber>1</LineNumber>
              <Variable>%TextLine%</Variable>
              </Action>
              <Action name="Set Text">
              <Type>75</Type>
              <Function>0</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              <ObjectName>Text1</ObjectName>
              <Text>%TextLine%</Text>
              </Action>
              <Action name="END IF">
              <Type>201</Type>
              <Function>1</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              </Action>
              <Action name="IF">
              <Type>200</Type>
              <Function>1</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              <Condition>%SysLanguage%=9</Condition>
              </Action>
              <Action name="Read">
              <Type>31</Type>
              <Function>0</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              <Variable>%TextFile%</Variable>
              <FileName>%SrcDir%\9.txt</FileName>
              </Action>
              <Action name="Get Line">
              <Type>58</Type>
              <Function>0</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              <FileName>9.txt</FileName>
              <LineNumber>1</LineNumber>
              <Variable>%TextLine%</Variable>
              </Action>
              <Action name="Set Text">
              <Type>75</Type>
              <Function>0</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              <ObjectName>Text1</ObjectName>
              <Text>%textline%</Text>
              </Action>
              <Action name="END IF">
              <Type>201</Type>
              <Function>1</Function>
              <DTIndentLevel>0</DTIndentLevel>
              <Enabled>1</Enabled>
              <ErrorHandling>
              <UserNotificationMode>2</UserNotificationMode>
              <CustomErrorMessage/>
              <OnErrorAction>0</OnErrorAction>
              <JumpToLabel/>
              </ErrorHandling>
              </Action>
              </IR_ACTIONS_LIST>

              ************************************************** *********
              Where is my mistake?
              Thank you again for your patience.

              Sincerely,
              BrasiBrasi :confused:

              Comment


              • #8
                Re: URGENT!!! Get Text from .XML file

                %TextFile%=TextFile.Read ["%SrcDir%\10.txt"]
                %TextLine%=TextFile.GetLine ["10.txt",1]

                Maybe

                %TextLine%=TextFile.GetLine ["10.txt",1]

                should be

                %TextLine%=TextFile.GetLine ["%SrcDir%\10.txt",1]

                Corey Milner
                Creative Director, Indigo Rose Software

                Comment


                • #9
                  Re: URGENT!!! Get Text from .XML file

                  Nothing change!
                  I am desperate...
                  Is it possible to do what i want to do?

                  Thank you. :confused:

                  Comment


                  • #10
                    Re: URGENT!!! Get Text from .XML file

                    Instead of %Syslanguage%, try using %AbsSystemLanguage%. I think that will accomplish what you are after.

                    Comment


                    • #11
                      Re: URGENT!!! Get Text from .XML file

                      Hi brasibrasi. Yes you can do it.

                      Corey Milner
                      Creative Director, Indigo Rose Software

                      Comment


                      • #12
                        Re: URGENT!!! Get Text from .XML file

                        Brett &amp; Corey:
                        Ok, I will try to use %AbsSystemLanguage% instead of %SysLanguage%
                        Thank you again!
                        :o

                        Comment

                        Working...
                        X