Support forum of the software localization tool Sisulizer


.NET, Delphi, ... - Sisulizer Localization Tool Support Home

Get in contact with the makers of Sisulizer.
Our forum is open for all questions around Sisulizer from customers and prospects.
Don't hesitate to register and ask. The Sisulizer team will answer ASAP.

Search     Help Home Sisulizer Website Download
Search by username
Not logged in - Login | Register 

 Moderated by: Renate.Reinartz, Markus.Kreisel, Jaakko.Salmenius, Ilkka.Salmenius
New Topic Reply Printer Friendly
Question on "automatic localization of XML attributes" - Wish list for software localization tool - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support
AuthorPost
 Posted: Thu Mar 5th, 2009 11:04 am
PM Private Upload Quote Reply
jhersant
Member
 

Joined: Tue Mar 3rd, 2009
Location: Denmark
Posts: 8
Status: 
Offline
We are evaluating, and will most definitely purchase, Sisulizer for our company. We have various applications, written in Delphi 7-2009, which have to be localized to various languages. The application itself is easy to localize, thanks to Sisulizer, but I have an issue regarding localization of external (XML) files used in this application.

What I am trying to do is creating a multilanguage XML file containing various texts in various languages. The input is something like:

    <?xml version="1.0" encoding="utf-8"?>
    <Translations>
      <Item symbolic_name="#FIRST_TEXT#" text="This is the first text"/>
      <Item symbolic_name="#SECOND_TEXT#" text="This is the second text"/>
    </Translations>


and the output should be like (2 languages defined):

    <?xml version="1.0" encoding="utf-8"?>
    <Translations>
      <Item symbolic_name="#FIRST_TEXT#" text="This is the first text" text_fr="C'est le premier texte" text_da="Det er den første text"/>
      <Item symbolic_name="#SECOND_TEXT#" text="This is the second text" text_fr="C'est le deuxième texte" text_da="Det er den anden text"/>
    </Translations>

The attributes are:
  • symbolic_name: obviously the symbolic name of the text to be translated (sort of ID) (must not be localized).
  • text: Original text in english (must not be localized). Its localization is stored as text_XX, where XX is the locale name.
  • text_XX: Text in locale XX (must be created/outputted by Sisulizer).
 
Can Sisulizer generate such a file? In other words, is Sisulizer able to automatically generate the attributes and automatically add/remove attributes when I add/remove languages? I have tried to select the "multilingual file" option in the XML source property sheet, but this does not have any effect (the output file is actually a copy of the original file ... I just don't understand this option for XML files).

An alternative is to use the "Localized files" options in the XML source property sheet, which produces standalone localized files per locale, but that is not really what we want.

Thanks for your assistance.

Back To Top PM Private Upload Quote Reply

 Posted: Thu Mar 5th, 2009 10:16 pm
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 1461
Status: 
Offline
Hello,

XML is very flexible language and current version of Sisulizer can’t to support correctly multilingual output file feature for all possible cases, because users XML solutions can be very diverse and we can’t to fulfill wishes of all users, and for this reason our solution could be unsatisfactorily for some users.
E.g for your example:

<?xml version="1.0" encoding="utf-8"?>
<Translations>
<Item symbolic_name="#FIRST_TEXT#" text="This is the first text"/>
<Item symbolic_name="#SECOND_TEXT#" text="This is the second text"/>
</Translations>

Sisulizer doesn’t create multilingual contents, but for below example:

<?xml version="1.0" encoding="utf-8"?>
<Translations>
<Item symbolic_name="#FIRST_TEXT#">This is the first text</Item>
<Item symbolic_name="#SECOND_TEXT#">This is the second text</Item>
</Translations>

Sisulizer will build following output file:

<?xml version="1.0" encoding="utf-8"?>
<Translations>
<Item symbolic_name="#FIRST_TEXT#">This is the first text</Item>
<Item symbolic_name="#SECOND_TEXT#">This is the second text</Item>
<Item xml:lang="fr" symbolic_name="#FIRST_TEXT#">C'est le premier texte" text</Item>
<Item xml:lang="de" symbolic_name="#FIRST_TEXT#">Det er den første text</Item>
<Item xml:lang="fr" symbolic_name="#SECOND_TEXT#">C'est le deuxième texte</Item>
<Item xml:lang="de" symbolic_name="#SECOND_TEXT#">Det er den anden text</Item>
</Translations>

BTW: As I mentioned above we can’t fulfill all wishes, however we always listen our customers, and we try to implement interested user requests, and I’ll ask our R&D about your issue.

Best regards,
Janusz



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Fri Mar 6th, 2009 03:25 am
PM Private Upload Quote Reply
Jaakko.Salmenius
Administrator


Joined: Sat Apr 8th, 2006
Location: Espoo, Finland
Posts: 2178
Status: 
Offline
There was a bug in Sisulizer that prevented adding localized attributes in multilingual output files. I fixed it in build 281. Now Sisulizer adds localized attributes. For example if we have the original English XML file:

<?xml version="1.0" encoding="UTF-8"?>
<sample value="One">
  <data>Two</data>
</sample>


If we add Finnish and Japanese to Sisulizer project and let Sisulizer to create the multilingual output file it will create this.

<?xml version="1.0" encoding="utf-8"?>
<sample value="One" value_fi="Yksi" value_ja="一">
  <data>Two</data>
  <data xml:lang="fi">Kaksi</data>
  <data xml:lang="ja">二</data>
</sample>


I have marked with green those items SL adds. The naming convention of localized attributes is <originalname>_<xml:lang>

Build 281 will come out in a week.

Jaakko



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Fri Mar 6th, 2009 05:48 am
PM Private Upload Quote Reply
jhersant
Member
 

Joined: Tue Mar 3rd, 2009
Location: Denmark
Posts: 8
Status: 
Offline
Hello guys,

Thanks for your quick answers.

Janusz: I was not aware that Sisulizer could localize XML tag values (not mentioned in the help file as far as I can see). Thanks for your example and for "enlighting" me on this.

Jaako: This is definitely good news. I am looking forward to seeing build 281, which apparently should do exactly was I was hoping for.

Well done gentlemen: Quick, precise and detailed answers...great support indeed!

Best regards,

Jérôme

Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 06:48 am
PM Private Upload Quote Reply
jhersant
Member
 

Joined: Tue Mar 3rd, 2009
Location: Denmark
Posts: 8
Status: 
Offline
I have installed build 281 yesterday and it seems that attribute localization is still not working as you said.

The source file is :
    <?xml version="1.0" encoding="utf-8"?>
    <Translations>
        <Translation symbol="_(at)_Text1" text="This is text 1"/>
        <Translation symbol="_(at)_Text2" text="This is text 2"/>
        <Translation symbol="_(at)_Text3" text="This is text 3"/>
        <Translation symbol="_(at)_Text4" text="This is text 4"/>
    </Translations>

I have selected "Multilingual file" in the output file radio group and Sisulizer outputs:
    <?xml version="1.0" encoding="utf-8"?>
    <Translations>
        <Translation symbol="_(at)_Text1" text="This is text 1"/>
        <Translation symbol="_(at)_Text2" text="This is text 2"/>
        <Translation symbol="_(at)_Text3" text="This is text 3"/>
        <Translation symbol="_(at)_Text4" text="This is text 4"/>
    </Translations>
Which is basically a copy of the source file.

I would have expected something like:
    <?xml version="1.0" encoding="utf-8"?>
    <Translations>
        <Translation symbol="_(at)_Text1" text="This is text 1"
text_DE="Bla bla DE 1" text_FR="Bla bla FR 1"/>
        <Translation symbol="_(at)_Text2" text="This is text 2"
text_DE="Bla bla DE 2" text_FR="Bla bla FR 2"/>
        <Translation symbol="_(at)_Text3" text="This is text 3"
text_DE="Bla bla DE 3" text_FR="Bla bla FR 3"/>
        <Translation symbol="_(at)_Text4" text="This is text 4"
text_DE="Bla bla DE 4" text_FR="Bla bla FR 4"/>
    </Translations>

By the way, the version history did not mention that it was fixed. Did you miss/forget it?

Best regards,

Jérôme

Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 08:18 am
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 1461
Status: 
Offline
Hello,

Bug was fixed, but Sisulizer creates multilingual contents of XML output files as localization attribute of tag, and Sisulizer expect enabling this tag item (Source properties > Tags tab) to localization, but it need localizable contents of tag, while in your case localizable are only tag attributes, and for this reason you can enable only these attributes, but not whole tag. So for e.g.

<Translations>
<Translation symbol="_(at)_Text1" text="This is text 1"/>
</Translations>

Sisulizer will create following output content:

<Translations>
<Translation symbol="_(at)_Text1" text=" This is text 1"/>
</Translations>

Because “Translation” tag is unavailable in Tags tab:

Attachment: screen.png (Downloaded 29 times)



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 08:25 am
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 1461
Status: 
Offline
If your tag will be changed to e.g.:

<Translations>
<Translation symbol="_(at)_Text1" text="This is text 1">something</Translation>
</Translations>

Sisulizer can create multilingual content, and you can to get following output contents (sample Sisulizer project have polish and Finnish translations):

<Translations>
<Translation symbol="_(at)_Text1" text="This is text 1">something</Translation>
<Translation xml:lang="pl" symbol="_(at)_Text1" text="To jest tekst">something</Translation>
<Translation xml:lang="fi" symbol="_(at)_Text1" text="Text in Finnish">something</Translation>
</Translations>

Because now you can enable parent tag item (not only tag attributes) to localization:

Attachment: screen1.png (Downloaded 29 times)



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 08:27 am
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 1461
Status: 
Offline
However I’ll ask our R&D about any solution for your issue.

Best regards,
Janusz



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 08:39 am
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Bedburg, Germany
Posts: 1613
Status: 
Offline
Hi Jérôme,

>>
I would have expected something like:

<?xml version="1.0" encoding="utf-8"?>
    <Translations>
        <Translation symbol="_(at)_Text1" text="This is text 1"
text_DE="Bla bla DE 1" text_FR="Bla bla FR 1"/>
        <Translation symbol="_(at)_Text2" text="This is text 2"
text_DE="Bla bla DE 2" text_FR="Bla bla FR 2"/>
        <Translation symbol="_(at)_Text3" text="This is text 3"
text_DE="Bla bla DE 3" text_FR="Bla bla FR 3"/>
        <Translation symbol="_(at)_Text4" text="This is text 4"
text_DE="Bla bla DE 4" text_FR="Bla bla FR 4"/>
    </Translations>
<<


This structure looks a little bit odd to me. If you think of database normalization (http://en.wikipedia.org/wiki/Database_normalization#Normal_forms) this would hurt the first normal form. XML is not a database but reasons why these rules are a good idea could be adapted to XML. From that perspective is the solution Janusz defined the better structure:

<?xml version="1.0" encoding="utf-8"?>
<Translations>
<Item symbolic_name="#FIRST_TEXT#">This is the first text</Item>
<Item symbolic_name="#SECOND_TEXT#">This is the second text</Item>
<Item xml:lang="fr" symbolic_name="#FIRST_TEXT#">C'est le premier texte" text</Item>
<Item xml:lang="de" symbolic_name="#FIRST_TEXT#">Det er den første text</Item>
<Item xml:lang="fr" symbolic_name="#SECOND_TEXT#">C'est le deuxième texte</Item>
<Item xml:lang="de" symbolic_name="#SECOND_TEXT#">Det er den anden text</Item>
</Translations>


Just my 2 cents :-)

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 10:51 am
PM Private Upload Quote Reply
jhersant
Member
 

Joined: Tue Mar 3rd, 2009
Location: Denmark
Posts: 8
Status: 
Offline
Thanks for your contributions.

I am not entirely sure I understand the conclusion of this and would appreciate precise answers to the following items:
  • Am I correct if I say that Sisuliser cannot localize attributes of a sub-node? I can easily localize attributes of the parent node (I have tried this) but cannot make it work with a sub-node.
  • Is it possible or not to output the file described in my post from 17-03-2009 08:48 as Sisulizer works today?
  • I understand what Janusz wrote in his posts 17-03-2009 10:18 and 17-03-2009 10:25, and that could possibly do the job for me, even though I would prefer having all translation items in a single where localizations would be stored has attributes (more compact and readable IMHO). Is it the only way to go?
Jérôme

Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 11:28 am
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Bedburg, Germany
Posts: 1613
Status: 
Offline
Hi Jérôme,

My issue is not with localizing attributes in general. It is about that there should not be attributes for the same reason in one row in the target.

It should be like Janusz described with multiple rows.

>>having all translation items in a single where localizations would be stored has attributes ... more compact and readable IMHO

This approach has many downsides.
- The lines will become very, very long for many languages
- Lines will become even longer if the original contains a long string. Then it is very hard to read 
- It is not a good style if you look at normalization
- It will need a special handling if you try to import
- The name of the attribute contains the language code.
- You can have user defined languages like xx and sub languages like de-DE. It will be very hard to find out what is the name and what is the language code.

Janusz structure is simple the much better structured XML. I think that our R&D will prefer this.

Best

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 11:47 am
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 1461
Status: 
Offline
Hello,

With current build of Sisulizer you can localize attributes of (parent) tags without localizable values, but not for multilingual output file option, because localized items are also saved to output files as attributes of parent tag, so you need enable localization of parent tag. You can’t enable it if this tag hasn’t localizable content.
You can translate attributes of tags without localizable values if you will select in source properties “Localized files” instead “Multilingual file”, because in this case Sisulizer simple localize existing attributes and doesn’t create new localization attributes.

Best regards,
Janusz



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 11:55 am
PM Private Upload Quote Reply
Janusz Grzybek
Super Moderator


Joined: Fri Dec 1st, 2006
Location: Zabrze, Poland
Posts: 1461
Status: 
Offline
because localized items are also saved to output files as attributes of parent tag, so you need enable localization of parent tag.
XML is very flexible language, but has also hierarchical structure and we try to respect it for XML localization process too.

Janusz



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 12:02 pm
PM Private Upload Quote Reply
jhersant
Member
 

Joined: Tue Mar 3rd, 2009
Location: Denmark
Posts: 8
Status: 
Offline
Hello again,

You came with interesting arguments Markus and, even though I have a tendency to prefer attributes over tag values, you have some really good points here.

I think I will go with Janusz's idea where the text to be localized is defined as a tag value. The only disadvantage of this is the size of the output file, and a (much) larger number of nodes, but technically I don't see any problem with that.

Thanks for you help guys!

Back To Top PM Private Upload Quote Reply

 Posted: Tue Mar 17th, 2009 12:30 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Bedburg, Germany
Posts: 1613
Status: 
Offline
Hi Jérôme,

You are right. The overhead of XML is huge. But today we deal with TB hard drives and high speed Internet :-)

I'm not involved in Janusz communication with the R&D. I hope he can help you to use his structure.

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

Current time is 04:02 pm  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Wish list for software localization tool > Question on "automatic localization of XML attributes"



WowUltra modified by Sisulizer Copyright © 2007-09 by Jim Hale - Based on WowBB Copyright © 2003-2006 Aycan Gulez

Sisulizer software localization tool - Three simple steps to localize