Comments (3)
Yes it is possible. Though not the way you suggested. You can build all msis from the same build script.
var project = new ManagedProject(...)
project.LocalizationFile = @"Language\en-US.wxl";
project.Language = "en-US";
project.OutFileName = "en.product.msi";
project.BuildMsi();
project.LocalizationFile = @"Language\en-FR.wxl";
project.Language = "fr-FR";
project.OutFileName = "fr.product.msi";
project.BuildMsi();
project.LocalizationFile = @"Language\de-DE.wxl";
project.Language = "de-DE";
project.OutFileName = "de.product.msi";
project.BuildMsi();
from wixsharp.
Thanks for your Help, but I have another Question...
private void dialog_Load(object sender, EventArgs e){
var box = System.Windows.Forms.MessageBox.Show("[KeyA]", "[KeyB]", (...) )
(...)
}
Is it possible to localize the Key´s for the MessageBox in the CodeBehind from a WinForm?
from wixsharp.
Typically. WinForm localization is done view dedicated resources *.resx and as such they have nothing to do with MSI. This is the most orthodox approach and it's covered very well by "WinForm Localization".
Alternatively can access the UIText table from the msi being executed and read any key value from it with MSI SQL statement via the session object. It is not trivial but possible and Wix# does for some scenarios.
However If you are using EmbeddedUI (ManagedUI) WiX compiler does not embed wxl file and the UIText table is not created. Wix# fixes this problem and embeds your whole language file as binary resource. You can access it at runtime like this:
var bytes = Session.TryReadBinary("WixSharp_UIText");
Convert it to whatever you want (e.g. XML) and you can read your text from it. Though MsiRuntime class already has the localization routine based on that embedded wxl file:
void next_Click(object sender, EventArgs e)
{
string localized = MsiRuntime.Localize("whatever");
Or you can even use the more powerful LocalizeWith extension:
void dialog_Load(object sender, EventArgs e)
{
next_button.LocalizeWith(MsiRuntime.Localize);
This extension reads the Text
property of the control, localizes it and sets it back to the control.
from wixsharp.
Related Issues (20)
- Create BA Installer for Server / Client Installation HOT 7
- WixSharp with v4 toolset not getting compiled and msi not found HOT 8
- How to read from a wxl file and use it in WixSharp HOT 4
- Installers seems stop working HOT 15
- wix4 broke me; so I came here to ask for help. HOT 9
- Uninstall / Delete Files or Dirs on Programm uninstallation HOT 3
- Missing images in Managed WPF UI HOT 27
- How to set title and description for CustomDialogWith<T> HOT 14
- ManagedUI not displaying localized language from wxl file. HOT 5
- Question : Make Wix# Wix Toolset v5 compatible HOT 3
- PerUser to PerMachin HOT 12
- WixSharp Setup - Bootstrapper Custom BA (Some assembly references are missing) in Designer HOT 2
- MSI language HOT 29
- BuildMsi is throwing System.IO.DirectoryNotFoundException HOT 2
- Can use Resource Dictionary? HOT 4
- Mainteance dialog (Change enabled button) HOT 2
- Transfer wix v3 Localization to V4 Loc in Wix# HOT 8
- %AppData% folder no replace by path wix4 HOT 4
- How to localization for Embedded WPF UI MSI HOT 9
- CA Name in Installprocess in V4 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wixsharp.