I'm upgrading a Wix installer to a Wix bundle. The installer is for a application that supports only one language, so I need the bundle's UI to be in that same language.
To change the wix installer's UI Language, I used the Language property of the Product tag (1046 is locale code for the language I want):
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Name="My aplication" ... Language="1046">
...
</Product>
</Wix>
Can I change the Language of the bundle's default UI? How?
My bundle:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle
Name="..."
Version="..."
Manufacturer="..."
UpgradeCode="...">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication
LicenseUrl=""
SuppressOptionsUI="yes"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" />
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="NetFx40Web"/>
<MsiPackage Id="..." SourceFile="..."/>
</Chain>
</Bundle>
</Wix>
Bundles don't have a language as they're usually used to install both neutral and many localized resources. WixStdBA automatically tries to show its UI with localized strings matching the user's chosen locale. But if you only ship English strings, for example, only English strings will be shown. You can choose a localization file (.wxl) using the WixStandardBootstrapperApplication/#LocalizationFile attribute.
(Today, only English strings are available for WixStdBA so you'd have to translate the .wxl strings if you want another language.)
Related
is there a way to substitute/override the default de.locallang.xlf of the extension via Typoscript? I want to change the text of mindshape_cookie_hint in a way that will survive an update.
If it is a plugin you can override translations in TypoScript via _LOCAL_LANG which is also what mindshape_cookie_hint suggests in its docs, for example:
plugin.tx_myext_pi1._LOCAL_LANG.de.list_mode_1 = Der erste Modus
This requires you to manage your translation strings in TypoScript though which is far from ideal.
A better and more general solution is registering custom translations via locallangXMLOverride. This allows you to manage these translations just like everywhere else.
From the documentation:
ext_localconf.php:
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:cms/locallang_tca.xlf'][] =
'EXT:examples/Resources/Private/Language/custom.xlf';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']
['de']['EXT:news/Resources/Private/Language/locallang_modadministration.xlf'][] = 'EXT:examples/Resources/Private/Language/Overrides/de.locallang_modadministration.xlf';
The first line shows how to override a file in the default language, the second how to override a German ("de") translation. The German language file looks like this:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2013-03-09T18:44:59Z" product-name="examples">
<header/>
<body>
<trans-unit id="pages.title_formlabel" xml:space="preserve">
<source>Most important tile</source>
<target>Wichtigster Titel</target>
</trans-unit>
</body>
</file>
</xliff>
You are looking for this https://wiki.typo3.org/TypoScript_language_additions,_override
As written by Ghanshyam Bhava in his answer, you can just take a look at
the locallang.xlf file in the plugin folder in the file system to have an overview of the keys the extension uses and then write in your TypoScript template:
plugin.tx_exampleplugin_pi1._LOCAL_LANG.it {
key1 = value1
key2 = value2
...
}
see also https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Plugin/Index.html#local-lang-lang-key-label-key
In a general way, correct me if I am wrong, I think that you have modified the original .xlf file of the plugin; this procedure is not recommended for the reason you are facing: an update would delete your changes.
A good way to deal with this problem could be for example using the extension EXT:lfeditor (https://extensions.typo3.org/extension/lfeditor/); read carefully its manual.
Another source (official documentation): https://docs.typo3.org/typo3cms/CoreApiReference/latest/ApiOverview/Internationalization/ManagingTranslations.html?highlight=locallangxmloverride#custom-translations
I'll take an excerpt from that page:
The $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'] allows to override both locallang-XML and XLIFF files. Actually this is not just about translations. Default language files can also be overridden. In the case of XLIFF files, the syntax is as follows (to be placed in an extension's ext_localconf.php file):
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:cms/locallang_tca.xlf'][] = 'EXT:examples/Resources/Private/Language/custom.xlf';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['de']['EXT:news/Resources/Private/Language/locallang_modadministration.xlf'][] = 'EXT:examples/Resources/Private/Language/Overrides/de.locallang_modadministration.xlf';
The first line shows how to override a file in the default language, the second how to override a German ("de") translation. The German language file looks like this:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2013-03-09T18:44:59Z" product-name="examples">
<header/>
<body>
<trans-unit id="pages.title_formlabel" xml:space="preserve">
<source>Most important tile</source>
<target>Wichtigster Titel</target>
</trans-unit>
</body>
</file>
</xliff>
With below typoscript you can overwrite individual translations for TYPO3 Extension:
plugin.tx_myPlugin_pi1._LOCAL_LANG.de.key = value;
plugin.tx_myPlugin_pi1._LOCAL_LANG.en.key = value;
Generally common for every extension. Hope this will help you!
Greetings!
I have made a custom bootstrapper application. I have customized the mbapreq.thm and mbapreq.wxl for custom UI.
My bundle.wxs looks like this.
<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost">
<Payload Name="1031\mbapreq.wxl" SourceFile="de\mbapreq.wxl" />
<Payload Name="1036\mbapreq.wxl" SourceFile="fr\mbapreq.wxl" />
<Payload Name="1041\mbapreq.wxl" SourceFile="ja\mbapreq.wxl" />
<Payload Name="2052\mbapreq.wxl" SourceFile="zh-CN\mbapreq.wxl" />
<Payload Name="3082\mbapreq.wxl" SourceFile="es\mbapreq.wxl" />
<Payload Name="mbapreq.thm" SourceFile="mbapreq.thm" />
</BootstrapperApplicationRef>
<bal:Condition
Message="!(loc.OSNOTSUPPORTED)">
(VersionNT >= v6.0)
</bal:Condition>
<Fragment>
<WixVariable Id ="PreqbaThemeWxl" Value="mbapreq.wxl"/>
<WixVariable Id ="PreqbaThemeXml" Value="mbapreq.thm"/>
</Fragment>
I have included OSNOTSUPPORTED in mbapreq.wxl also.
<String Id="OSNOTSUPPORTED">This application is only supported on Windows Server 2003 (32 and 64bit), Windows 2008 (32 and 64bit) and Windows 2008 R2 (Windows 7) or higher.</String>
Same string OSNOTSUPPORTED are added for other languages also.
I have also including "-loc mbapreq.wxl" into make file.
When I run my application UI is getting changed as per mbapreq.thm for all the languages.
But UI is reflecting "OSNOTSUPPORTED" as per english language only even when running application in other languages (With -lang 1031 parameter).
So anyone could help how to localize the bal:condition ??
I believe the issue is incorrect variable type as you want to find the theme text
! is used for linker
# is used for runtime theme
<bal:Condition Message="#(loc.OSNOTSUPPORTED)">
How is it possible to add translations of strings to the felogin plugin? I slowly start to get the convention for templates (directing to the modified templates in the plugin's typoscript configuration) but that does not work with the locallang. The original messages are in English in the xlf format, located in the plugin's folder. I know this can be done in TypoScript but I do not like to have the strings defined so incosistently. (I guess modifying that original file is not the proper way.)
Overriding labels by TypoScript is the way to go. Manually editing the l10n files is a really bad idea - these files are overwritten on updating the translations. If the extension gets an update and new labels are added, you will want to perform the updates.
The change from XML files for translation to the XLIFF format didn't change anything in the best practise you should use for adjusting labels according to your needs. It's just another format with a standardized translation server (Pootle) that (in theory) allows some special features like e.g. plural forms.
Conclusion: Use TypoScript.
For the default language (no config.language set) use:
plugin.tx_felogin_pi1._LOCAL_LANG.default {
key = value
}
For a specific language, e.g. German, use
plugin.tx_felogin_pi1._LOCAL_LANG.de {
key = value
}
The best way is to use the following code:
ext_tables.php, e.g. of your theme extension with
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:felogin/Resources/Private/Language/locallang.xlf'][] = 'EXT:theme/Resources/Private/Language/locallang_felogin.xlf';
and in this file you can use something like
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2015-06-30T21:14:27Z">
<header>
<description>Language labels for felogin</description>
</header>
<body>
<trans-unit id="permalogin">
<source>An diesem Rechner angemeldet bleiben</source>
</trans-unit>
<trans-unit id="ll_forgot_header">
<source>Passwort vergessen?</source>
</trans-unit>
<trans-unit id="ll_welcome_header">
<source>Sie betreten den Händlerbereich</source>
</trans-unit>
<trans-unit id="ll_welcome_message">
<source>Bitte loggen Sie sich ein.</source>
</trans-unit>
</body>
</file>
</xliff>
You can use the BE language module to download preconfigured locallangs for every language you need.
The files are stored in e.g. typo3conf/l10n/de/fe_login.
You can edit these files manually in l10n to get your own strings inside or use an extension like snowbabal to do the editing inside a BE module.
I am creating a Document Library from an event receiver. I would like to change the Document Library to a custom Word document. In the user interface, this is simply done by changing the Template URL value in the Document Template property under Document Library Advanced Settings. I'm not sure how to do this via code.
I would also be open to creating a list template with my document template already setup, but I'd prefer to go the other route so I retain the flexibility of setting up each document library with a different template.
Thanks.
Specify it within your content type definition in the elements.xml for the feature and add a module file reeference.
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ContentType ID="0x010100DC863B72929F8148A8A84BF932C5356701"
Name="Word 2007"
Group="CEO Content Types"
Sealed="FALSE"
FeatureId="332a1967-3ae1-498b-ba11-f03743cab20b">
<FieldRefs />
<DocumentTemplate TargetName="Untitled.docx"/>
</ContentType>
<Module Name="WordDefaultFile" Url="_cts/MyWord" RootWebOnly="TRUE">
<File Url="Untitled.docx" Name="Untitled.docx" Type="Ghostable"></File>
</Module>
</Elements>
Copy the template to your feature directory and add an ElementFile reference to it within the ElementsManifest section of your feature.xml.
<ElementManifests>
<ElementManifest Location="MyWord-CT.xml" />
<ElementFile Location="Untitled.docx"/>
</ElementManifests>
</Feature>
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