Wix I18n Dev.The version of wixtoolset is V3.7.
And the Installer UI is created by UIExtension.
In the installation process, there are some UI strings cannot be localized. Such as "Copying new files" and so on. I searched these strings and there are laid in the wix source code(wix37-sources\src\ext\UIExtension\wixlib\WixUI_en-us.wxl), and wix has localized these strings.
It's confusing to me that wix has localized these strings, but it still displayed as English in the installation process. Even I replaced there strings in .wxl file ,it still displayed as English strings.
I tried the example of BdN3504.
the wxs file is the same as BdN3504.
the wxl file is
and you can see the status is still keep English.
My build environment is VS2010 & wix3.7. I don't know what's wrong with it....
I already answered this question here.
Either read that or check out the paragraph called Progress Bar Messages in Nick Ramirez' book WiX 3.6: A Developer's Guide to Windows.
The good people of packtpublishing are offering the chapter of his book containing that paragraph for free here:
Chapter 12: Localizing Your Installer. See page 329.
Another page of interest is this MSDN article: Standard Actions Reference which is also noted in the book.
Edit: Because of the comments I will post a working minimal example and a screenshot, so you see that it works:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="LocalizingErrors" Language="1034" Version="1.0.0.0" Manufacturer="SomeOne" UpgradeCode="7ddbcad4-98d9-4c2d-9ae6-6fdc47314947">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MediaTemplate EmbedCab="no" />
<Feature Id="ProductFeature" Title="LocalizingErrors" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<!-- Custom Progress messages
Custom progress messages are defined by a table in the MSI called ActionText. However, by default
this table isn't included. Without it, the messages are the stock English versions.
To add the ActionText table with strings for progress messages, add a ProgressText element inside
a UI element for each standard action found in the Execute sequence. For example, to add a
localized message for the InstallFiles action, add the following markup to one of your wxs files:
-->
<UI>
<ProgressText Action="InstallFiles" Template="!(loc.InstallFilesTemplate)">!(loc.InstallFiles)</ProgressText>
<ProgressText Action="CreateShortcuts" Template="!(loc.CreateShortcutsTemplate)">!(loc.CreateShortcuts)</ProgressText>
<ProgressText Action="WriteRegistryValues" Template="!(loc.WriteRegistryValuesTemplate)">!(loc.WriteRegistryValues)</ProgressText>
<ProgressText Action="RegisterUser" Template="!(loc.RegisterUserTemplate)">!(loc.WriteRegistryValues)</ProgressText>
<ProgressText Action="RegisterProduct" Template="!(loc.RegisterProductTemplate)">!(loc.RegisterProduct)</ProgressText>
<ProgressText Action="PublishFeatures" Template="!(loc.PublishFeaturesTemplate)">!(loc.PublishFeatures)</ProgressText>
<ProgressText Action="PublishProduct" Template="!(loc.PublishProductTemplate)">!(loc.PublishFeatures)</ProgressText>
<ProgressText Action="InstallFinalize" Template="!(loc.InstallFinalizeTemplate)">!(loc.InstallFinalize)</ProgressText>
</UI>
<UIRef Id="WixUI_Minimal"/>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="LocalizingErrors" />
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent" Guid="92A175A0-D15D-48EC-B2E1-FD5848FB6430">
<File Id="somefile" Source="..\File.exe" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Accompanying this example, you have to have a localisation file for your Culture. You have to set the Culture in the project properties under Build->Cultures to build. In my case I named it es-es.wxl and the file contents follow:
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="es-es" xmlns="http://schemas.microsoft.com/wix/2006/localization" Codepage="1252" Language="1034">
<String Id="Error_1311">Archivo no encontrado: [2]. Compruebe que el archivo existe y que puedes acceder a él.</String>
<String Id="InstallFiles">Installazione del archivos</String>
<String Id="InstallFilesTemplate">Archivo: [1], Tamaño de archivo: [6], Directorio: [9]</String>
<String Id="CreateShortcuts">Creacion de los atajos</String>
<String Id="CreateShortcutsTemplate">Atajo [1] creado</String>
<String Id="WriteRegistryValues">Escribir en registro</String>
<String Id="WriteRegistryValuesTemplate">Camino: [1], Nombre: [2], valor: [3]</String>
<String Id="RegisterUser">Registrar a los usuarios</String>
<String Id="RegisterUserTemplate">Usario: [1]</String>
<String Id="RegisterProduct">Registrar producto</String>
<String Id="RegisterProductTemplate">Producto: [1]</String>
<String Id="PublishFeatures">Publicar las características</String>
<String Id="PublishFeaturesTemplate">Caraterística: [1]</String>
<String Id="PublishProduct">Publicar el producto</String>
<String Id="PublishProductTemplate">Producto: [1]</String>
<String Id="InstallFinalize">Finalizar la instalación</String>
<String Id="InstallFinalizeTemplate">Finalizar [ProductName]</String>
</WixLocalization>
Lastly a Screenshot to show you that it works:
Another edit: To localize error strings, you simply have to define Error elements with the corresponding error numbers:
<UI>
<Error Id="1322">Una parte de la ruta de la carpeta no es válido. Se está vacío o supera la longitud permitida por el sistema.</Error>
<Error Id="1311">!(loc.Error_1311)</Error>
</UI>
The first error string is hard-coded, so that's not such a good solution. It's better to use localization files, as it is done in the second Error element.
Related
I'm normally in Angular / Cordova world, but now im pressured to edit a native plugin, which im using with Cordova.
Source of the plugin
https://github.com/wildabeast/BarcodeScanner/tree/master/src/ios
Can anyone explain me how I have to edit the files to manipulate the size of the cancel button.
scannerOverlay.xib
<object class="IBUINavigationItem" id="240626599">
<reference key="IBUINavigationBar" ref="1064216609"/>
<string key="IBUITitle">Barcode Scanner</string>
<object class="IBUIBarButtonItem" key="IBUILeftBarButtonItem" id="1053701234">
<string key="IBUITitle">Cancel</string>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIStyle">1</int>
<reference key="IBUINavigationItem" ref="240626599"/>
</object>
I have successfuly created a localized installer and bootstrapper setup using WiX. There is just one problem with the bootstrapper localization. Everything is fine except the values of button captions in a dialog that appears when the installation is being canceled (exit confirmation yes/no). There are no string elements in the bootstrapper theme wxl files that would allow to change these values. In the MSI installer this was possible by setting "WixUIYes", "WixUINo" values.
I have tried to add the following elements to my localized theme file, but without success.
<String Id="WixUIYes" Overridable="yes">some_value1</String>
<String Id="WixUINo" Overridable="yes">some_value2</String>
Is there a way to change the caption values of mentioned buttons? Their values are currently in the system language.
This is my WXS file:
<?xml version='1.0' encoding='windows-1250'?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Test" Version="1.0.0.0" UpgradeCode="MY-GUID">
<WixVariable Id="WixStdbaThemeXml"
Value="Resources\HyperlinkTheme.xml" />
<WixVariable Id="WixStdbaThemeWxl"
Value="Resources\LocalizedHyperlinkTheme.wxl" />
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense" >
<bal:WixStandardBootstrapperApplication LicenseUrl="" SuppressOptionsUI="yes" />
</BootstrapperApplicationRef>
<Chain>
<ExePackage Id="VCRedistExe"
Cache="no"
Compressed="no"
Vital="yes"
SourceFile="vcredist_x86.exe" />
<MsiPackage Id="MyAppMsi"
Cache="no"
Compressed="yes"
Vital="yes"
SourceFile="MyApp.msi"
DisplayInternalUI="yes" />
</Chain>
</Bundle>
</Wix>
I am having some problems regarding the use of locallang.xml
I have this:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<T3locallang>
<meta type="array">
<type>module</type>
<description>Language labels for BE plugin</description>
</meta>
<data type="array">
<languageKey index="default" type="array">
<label index="mlang_testtext">This is a test text to be translated</label>
</languageKey>
<languageKey index="es" type="array">
<label index="mlang_testtext">Esto es un texto de prueba para ser traducido</label>
</languageKey>
</data>
</T3locallang>
Inside fluid template, I can use
<f:translate key="mlang_testtext" />
But If I try
{LLL:mlang_testtext}
All I get is the text Array
Also, if I try both of them inside a partial template, neither of those ones works.
EDIT: There are places where I can't use <f:translate .../> for example in button labels so I need the other form working too
What am I missing?
Check /typo3/sysext/fluid/Classes/ViewHelpers/TranslateViewHelper.php for sample of correct inline usage, so for an example setting your label as a default value of the input field would look like this:
<f:form.textfield name="myTextBox" value="{f:translate(key: 'mlang_testtext')}" />
I've created installation using WIX V3 with localization to French.
The installation works fine, but then we found out a weird thing:
After installing the produce we try to uninstall it.
During the uninstall we press cancel, and then the installation performing rollback (which is fine). The problem is that during the rollback the statuses appears in English...
For Example:
I've search for the strings in English & French wxl but couldn't fine them.
The installation was tested on French OS.
Does anyone have an idea, where those strings could come from?
Are you referencing the progress strings in your setup?
WiX doesn't include these by default, so you need to ensure that you manually reference them as follows:
<UIRef Id="WixUI_ErrorProgressText" />
Then as long as you're including the French language in your setup (fr-FR), the localized strings will be included.
The ActionText table is not created by default.
You have to create it yourself by adding a UI element to one of your wxs files. This UI element has to contain ProgressText elements. Set the Id attribute of each ProgressText element to the name of a standard action. The inner text of such an element will overwrite the string that is shown for that particular action.
The ProgressText element also has a Template attribute. Take a look at the documentation for each standard action to define the appropriate template here: Standard Actions Reference. I don't know which specific action is displaying the string you are looking for.
It's best to not hardcode the values for each ProgressText element but instead use a localization file. Create two localization strings for each ProgressText element. One for the Template and one for the actual value.
Example
wxs file
<UI>
<ProgressText Action="InstallFiles" Template="!(loc.InstallFilesTemplate)">!(loc.InstallFiles)</ProgressText>
<ProgressText Action="CreateShortcuts" Template="!(loc.CreateShortcutsTemplate)">!(loc.CreateShortcuts)</ProgressText>
<ProgressText Action="WriteRegistryValues" Template="!(loc.WriteRegistryValuesTemplate)">!(loc.WriteRegistryValues)</ProgressText>
<ProgressText Action="RegisterUser" Template="!(loc.RegisterUserTemplate)">!(loc.WriteRegistryValues)</ProgressText>
<ProgressText Action="RegisterProduct" Template="!(loc.RegisterProductTemplate)">!(loc.RegisterProduct)</ProgressText>
<ProgressText Action="PublishFeatures" Template="!(loc.PublishFeaturesTemplate)">!(loc.PublishFeatures)</ProgressText>
<ProgressText Action="PublishProduct" Template="!(loc.PublishProductTemplate)">!(loc.PublishFeatures)</ProgressText>
<ProgressText Action="InstallFinalize" Template="!(loc.InstallFinalizeTemplate)">!(loc.InstallFinalize)</ProgressText>
</UI>
localization file
<String Id="InstallFiles">Installazione del archivos</String>
<String Id="InstallFilesTemplate">Archivo: [1], Tamaño de archivo: [6], Directorio: [9]</String>
<String Id="CreateShortcuts">Creacion de los atajos</String>
<String Id="CreateShortcutsTemplate">Atajo [1] creado</String>
<String Id="WriteRegistryValues">Escribir en registro</String>
<String Id="WriteRegistryValuesTemplate">Camino: [1], Nombre: [2], valor: [3]</String>
<String Id="RegisterUser">Registrar a los usuarios</String>
<String Id="RegisterUserTemplate">Usario: [1]</String>
<String Id="RegisterProduct">Registrar producto</String>
<String Id="RegisterProductTemplate">Producto: [1]</String>
<String Id="PublishFeatures">Publicar las características</String>
<String Id="PublishFeaturesTemplate">Caraterística: [1]</String>
<String Id="PublishProduct">Publicar el producto</String>
<String Id="PublishProductTemplate">Producto: [1]</String>
<String Id="InstallFinalize">Finalizar la instalación</String>
<String Id="InstallFinalizeTemplate">Finalizar [ProductName]</String>
note: i don't know spanish, i just let google translate it.
Here is list of the standard actions occuring in the correct order you might want to take a look at:
InstallInitialize Action
ProcessComponents Action
InstallFiles Action
CreateShortcuts Action
WriteRegistryValues Action
RegisterUser Action
RegisterProduct Action
PublishFeatures Action
PublishProduct Action
InstallFinalize Action
My knowledge is based on a book with the following ISBN: 978-1782160427
I would like, that if the user says "help" that the following field doesn't get filled, and that the user gets all possible options.
<form id="test">
<field name="var1">
<prompt bargein="true" bargeintype="hotword" >say xy </prompt>
<grammar src = "grammar.grxml" type="application/srgs+xml" />
<filled>
<assign name="myProdukt" expr="var1" />
you said <value expr="myProdukt"/>
</filled>
</field>
(let's say in the external grammar is "p1", "p2" and "p3", the user says "help", and the systems says "p1","p2","p3" and the user can choose again - therefore the word "help" has to be in the external grammar as well, doesn't it?)
thanks in advance
Yes, the active grammar must contain a "help" utterance which returns the value 'help'. You then catch the event with a help tag:
<?xml version="1.0" encoding="UTF-8"?>
<vxml xmlns="http://www.w3.org/2001/vxml" version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd">
<form id="test">
<field name="var1">
<prompt bargein="true" bargeintype="hotword" >say xy </prompt>
<grammar src = "grammar.grxml" type="application/srgs+xml" />
<filled>
<assign name="myProdukt" expr="var1" />
you said <value expr="myProdukt"/>
</filled>
<help>
To choose a product, say,
<!-- whatever the product choices are -->
frobinator, submarine, curling iron, ..
<reprompt/>
</help>
</field>
</form>
</vxml>
Alternatively, following the DRY principle, this effect can be done globally for your application with using an application root document containing a link element. In the example app-root.vxml document below, there is a linkbinding a global grammar "help" utterance to the help event :
<?xml version="1.0"?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
<link event="help">
<grammar mode="voice" root="root_rule" tag-format="semantics/1.0"
type="application/srgs+xml" version="1.0" xml:lang="en-US">
<rule id="root_rule" scope="public">
<one-of>
<item weight="1.0">
help
</item>
</one-of>
</rule>
</grammar>
</link>
</vxml>
This grammar will be active everywhere -- effectively merged with each active field grammar. If you need more information about application root documents, the section of the VoiceXML specification Executing a Multi-Document Application explains. Also see Handling Events from the Tellme Studio documentation
Then, in pages of your application, make reference to the application root document via the application attribute of the vxml element and speak appropriately in a help catch block:
<?xml version="1.0" encoding="UTF-8"?>
<vxml xmlns="http://www.w3.org/2001/vxml" version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml http://www.w3.org/TR/voicexml20/vxml.xsd"
application="app-root.vxml">
<form id="test">
<field name="var1">
<prompt bargein="true" bargeintype="hotword" >say xy </prompt>
<grammar src = "grammar.grxml" type="application/srgs+xml" />
<filled>
<assign name="myProdukt" expr="var1" />
you said <value expr="myProdukt"/>
</filled>
<help>
To choose a product, say,
<!-- whatever the product choices are -->
frobinator, submarine, curling iron, ..
<reprompt/>
</help>
</field>
</form>
</vxml>
You could, of course, put the link code in the same page as your form, but it is likely you will want help active for every field of your application unless there is collision with something in a particular field's grammar.