View previous topic :: View next topic |
Author |
Message |
sheitman
Joined: 27 Apr 2010 Posts: 98
|
Posted: Tue Apr 19, 2011 1:45 pm Post subject: Issue with Wix Language Files |
|
|
Hi.
I tried to localize WiX Language Files (wxl) via the xml localization but I get a strange error.
Quote: | ** WARNING E004: The item (/WixLocalization/String[@Id='LANG']) could not be found in target (test\test.xml). This item will be skipped. |
You can find the sample project here.
I guess some native support for wxl file is not planned?
Kind regards,
Sven |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Apr 19, 2011 11:12 pm Post subject: |
|
|
Thanks very much for the sample project - it makes it so much easier to track issues down. It looks like there is an issue with with scanning XML files that use namespaces. The fix looks relatively simple and we will get a release out to fix this as soon as possible (later today probably).
An alternative that you might want to consider is to use Globalizer to localize the MSI package produced by WIX rather than the WIX source files. One advantage of this is that Globalizer can produce a multilingual MSI package that chooses the language based on the users locale. _________________ Infralution Support |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Apr 20, 2011 12:58 am Post subject: |
|
|
We have now released version 2.3.11 which fixes this issue with scanning XML files that use namespaces. _________________ Infralution Support |
|
Back to top |
|
|
sheitman
Joined: 27 Apr 2010 Posts: 98
|
Posted: Wed Apr 20, 2011 7:26 am Post subject: |
|
|
Infralution wrote: | An alternative that you might want to consider is to use Globalizer to localize the MSI package produced by WIX rather than the WIX source files. One advantage of this is that Globalizer can produce a multilingual MSI package that chooses the language based on the users locale. |
I have tried this but I was not happy about the result.
I have already built an msi file with integrated mst files for other languages.
Globalizer has not found them so I would have to translate all the default UI resources which are already translated by the WIX team or I have to integrate them into the globalizer file in some way.
I also missed the messages I used in pre conditions, something like "You need administrator privilegs to install this application".
I will try the wxl way this time.
I'm also not sure if it will work because the element has an attribute where the culturename is specified, this means its differend for each language and file and I fear that this could be some problem.
Infralution wrote: | We have now released version 2.3.11 which fixes this issue with scanning XML files that use namespaces. |
Thanks a lot. |
|
Back to top |
|
|
sheitman
Joined: 27 Apr 2010 Posts: 98
|
Posted: Wed Apr 20, 2011 7:37 am Post subject: |
|
|
sheitman wrote: | Infralution wrote: | An alternative that you might want to consider is to use Globalizer to localize the MSI package produced by WIX rather than the WIX source files. One advantage of this is that Globalizer can produce a multilingual MSI package that chooses the language based on the users locale. |
I have tried this but I was not happy about the result.
I have already built an msi file with integrated mst files for other languages.
Globalizer has not found them so I would have to translate all the default UI resources which are already translated by the WIX team or I have to integrate them into the globalizer file in some way.
I also missed the messages I used in pre conditions, something like "You need administrator privilegs to install this application".
I will try the wxl way this time.
I'm also not sure if it will work because the root element WixLocalization has an attribute named Culture where the culturename is specified for which this file is. This means its differend for each language and each file and I fear that this could be some problem.
EDIT
Yep, it is a problem. The value is alway the one from the german file.
What I would need is some way to tell globalizer "put the culture name into this attribute"
Infralution wrote: | We have now released version 2.3.11 which fixes this issue with scanning XML files that use namespaces. |
Thanks a lot. |
|
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Wed Apr 20, 2011 10:14 am Post subject: |
|
|
The culture property in the wxl files shouldn't be a problem you just need to scan it as well and translate it. To scan it add a "Scan XML Nodes" entry with the following path:
Code: | /ns:WixLocalization/@Culture |
For anyone else interested in localizing wix string files below are the complete XML properties required:
Code: | Scan Xml Nodes
Path
=======================
/ns:WixLocalization/@Culture
/ns:WixLocalization/ns:String
XML Node Context
NodeName Context Path
=======================
String @ID
Namespace Definitions
Prefix Namespace
=======================
ns http://schemas.microsoft.com/wix/2006/localization
|
If you did want to retry the MSI localization approach you should be able to import existing translations from culture specific MSI files you have built from wix source.
The best way to do this would be to scan the invariant MSI file then use Globalizer to build culture specific MSI files. This will ensure that you know where Globalizer is expecting the culture specific files to be. Next relace the culture specific MSI files that Globalizer built (which won't have any translations) with the MSI files that you had built using WIX. Finally you scan with the All Cultures option enabled. This should scan in the culture specific resources.
The issue with the missing messages can almost certainly be fixed by adding a new Table target to the MSI, adding a scan column or adjusting scan filters. By default MSI targets are setup for scanning MSI files produced by Visual Studio setup and deployment projects. WIX produces MSI files that use slightly different tables, columns and rows. You can open the MSI file in Orca (Microsoft's MSI editing tool) to find out where WIX is putting the missing messages. Then add the required table, column, scan filter definitions to scan them. _________________ Infralution Support |
|
Back to top |
|
|
sheitman
Joined: 27 Apr 2010 Posts: 98
|
Posted: Wed Apr 20, 2011 12:08 pm Post subject: |
|
|
Wow, thanks. You are amazing. =) |
|
Back to top |
|
|
|