How to add localization in the custom uninstall dialog box #1716
Unanswered
Vaibhav1825
asked this question in
Q&A
Replies: 1 comment
-
You are right. the session object is no longer available after the session is terminated. IE read the localization file from your msi in some early dialogs: // project
var project = new ManagedProject(...
new Binary("myLang.wxl"),
// uninstall dialog
class MyUninstallDialog
{
public static Func<string, string>Localize;
. . .
this.LocalizeWith(this.Localize)
// early dialog (e.g. WelcomeDlg)
var bytes = sessiom.ReadBinary("myLang.wxl"); // alternatively you can save the localization data to the temp file to read it later
var translations = new ResourcesData();
translations.InitFromWxl(bytes);
MyUninstallDialog.Localize = text => translations.ContainsKey(text) ? translations.[text] : text;
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello @oleg-shilo, I want to implement localization in the custom uninstall dialog box of my project.
I have made the custom dialog for the uninstall and called that dialog on after uninstall but I am unable to do localization of that uninstall custom dialog.
For adding localization in the other custom dialog boxes, I have used the .LocalizeWith(this.Runtime.Localize) feature, but in the uninstall dialog I am unable to use the session property or access the session.
Can you please help me on this about how to implement localization in the custom uninstall dialog.
Beta Was this translation helpful? Give feedback.
All reactions