XML Import

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
direct
Posts: 4
Joined: Mon Feb 22, 2010 12:35 pm

XML Import

Post by direct »

Hi,
we are encountering a problem while importing a XML file into a .sib File.
We try to import only those languages that are filled in the xml.

Example:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<XML>
  <HEAD>
    <SilEditor_Version>5.2.0.29</SilEditor_Version>
    <CreationDate Format="dd/mm/yyyy">25.03.2011</CreationDate>
    <CreationTime Format="hh:nn:ss">16:46:08</CreationTime>
    <Source_Type>.sib</Source_Type>
    <Source_UTF-8>False</Source_UTF-8>
  </HEAD>
  <FORMS>
    <Form Name="TfrmLogin">
      <Section Name="Captions">
        <String ID="btnCancel">
          <Language Name="de-DE">&Abbrechen</Language>
        </String>
        <String ID="btnLogin">
          <Language Name="de-DE">&Loginbla</Language>
          <Language Name="es-ES">Conectarbla</Language>
        </String>
      </Section>
    </Form>
  </FORMS>
</XML>

What happens, when I Import the XML:
The languages, that are not present, get deleted in the TsiLang Files Editor. The translation of &Abbrechen gets deleted as well.

What we want:
Import the XML so that only the Filled languages get imported.
All other String IDs (like "BtnCancel"), where only the de-DE - Language is filled should not change the File at all. Also the other languages (like it-IT or en-GB) should not get deleted.

Is there a flag in the XML to force such importing?

Regards,

Holger Prokoph
[/code]
direct
Posts: 4
Joined: Mon Feb 22, 2010 12:35 pm

Post by direct »

Hi,
the problem has changed a bit...
I came across the Merge-function and tried to merge those files together.
Now I need a specification, how the XML-File should look like in order to import it in the right way.

I tried the following:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<XML>
  <HEAD>
    <SilEditor_Version>5.2.0.29</SilEditor_Version>
    <CreationDate Format="dd/mm/yyyy">25.03.2011</CreationDate>
    <CreationTime Format="hh:nn:ss">16:46:08</CreationTime>
    <Source_Type>.sib</Source_Type>
    <Source_UTF-8>False</Source_UTF-8>
  </HEAD>
  <FORMS>
    <Form Name="TfrmLogin">
      <Section Name="Captions">
        <String ID="btnLogin">
          <Language Name="es-ES">Conectarbla</Language>
          <Language Name="en-GB">ConnectBlae</Language>
        </String>
      </Section>
    </Form>
    <Form Name="TPEP">
      <Section Name="Captions">
        <String ID="Close1">
          <Language Name="es-ES">Cerrar Übla</Language>
        </String>
        <String ID="Hilfe1">
          <Language Name="en-GB">Help me</Language>
        </String>
        <String ID="PEP1xdrucken1">
          <Language Name="en-GB">Print Onetime</Language>
        </String>
      </Section>
      <Section Name="Multilines">
      </Section>
      <Section Name="Strings">
      </Section>
    </Form>
  </FORMS>
</XML>
but this fills the "help me" and the "print Onetime" into Spanish language?!?

Please tell me, how the XML should be formatted in Order to refill the tables in the right way.

Thanks, Regards,
Holger Prokoph[/code]
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

Please see our reply by email.
Best regards,
Igor Siticov.
Post Reply