3

I've got Qt Installer Framework QtIFW2.0.1 installed and I had a look at the shipped examples.
When I had a closer look at the example translations I learned how I can translate the content of a custom ui file. But what I neither saw in the example nor in the documentation is how I can translate text that is located in the component package.xml file.
In the above mentioned example this looks like this:

<?xml version="1.0" encoding="UTF-8"?> <Package> <DisplayName>The root component</DisplayName> <Description>This component contains a license and translations to German.</Description> <Version>0.5.0-1</Version> <ReleaseDate>2015-01-29</ReleaseDate> <Licenses> <License name="Beer Public License Agreement" file="license.txt" /> </Licenses> <Default>true</Default> <Script>installscript.qs</Script> <UserInterfaces> <UserInterface>page.ui</UserInterface> </UserInterfaces> <Translations> <Translation>de.qm</Translation> <Translation>pl.qm</Translation> </Translations> </Package>

So, long story short: How can I translate this particular text-line:
<Description>...</Description>
?

Michael
  • 462
  • 1
  • 5
  • 12

2 Answers2

3

This is actually pretty simple:

<Description>Miam-Player is the main program. It is required and cannot be unselected.</Description>
<Description xml:lang="fr_fr">Miam-Player est le programme principal. Il est requis et ne peut être désélectionné.</Description>

I don't think you need something else.

MBach
  • 1,647
  • 16
  • 30
  • 1
    Works like a charm for package files, but will result in an error if used for the `config.xml`. The error is `Caught exception: Error in ./config/config.xml, line 4, column 24: Element 'Name' has been defined before.` - Is there a way to do it in the config file too? – Felix Jan 19 '16 at 20:20
  • @Michael alright. Maybe you could accept this answer then? – MBach Jan 24 '16 at 14:41
1

Maybe only in IFW 3.0, but in my case it worked.

To specify localization of "DisplayName", you need to use 5-character name of language, and for "Desctiption" you need to use language name of 2 letters

<DisplayName>The root component</DisplayName>
<DisplayName xml:lang="ru_RU">Корневой компонент</DisplayName>
<Description>Miam-Player is the main program. It is required and cannot be unselected.</Description>
<Description xml:lang="ru">Miam-Player это основная программа. Она необходима и не может быть отменена</Description>
Francuz
  • 433
  • 5
  • 13