I don't know why that specific thing doesn't work, but if you are in
the UI dialogs, then there are no .resx files installed, or resource
Dlls either.

>From the MSI point of view, the big picture is that MSI files do one
language at a time, typically applied at install time by specifying a
transform for the specific language in the command line options.. So
there is no point in having code that chooses between multiple
languages when there will only be one language in the MSI being
installed. You'd build a transform for that MSI file that includes
localized dialogs and errors. The errors are in the Error table, so
your custom action code just gets the error text from the Error table
by number. That's why the DTF Session.Message call has an overload
that takes an error number, meaning "just display the text associated
with this error number". This is the way that MSI files are localized.

There is also WiX help for localized strings for the install, see
following link, but I believe that's mainly to do with building
separate MSIs for each language without using transforms, but using
WiX localization features instead. There's still one language per MSI.

http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/make_installer_localizable.html
---------------
Phil Wilson


On Fri, Jul 4, 2014 at 7:42 AM, Vaghela, Rajesh
<rajesh.vagh...@capgemini.com> wrote:
> Hi Friends,
>
> I have created one custom dialog on its next it validates whether the 
> selected folder is system folder or not.
> To achieve the above requirement I have created custom action using c#, to 
> this custom action selected path is being send. In case the selected path is 
> system folder then it call Win32 MessageBox.Show("System folder not allowed").
> Everything works fine as expected.
>
> Now the problem is I need to localize the text "System folder not allowed", 
> so I have created Messages.resx and Messages.fr-FR.resx resource file. And 
> purposely for testing I have set
>
>          System.Resources.ResourceManager rm = new 
> System.Resources.ResourceManager("MyCustomAction.Messages", 
> Assembly.GetExecutingAssembly());
>                         string culture = "fr-FR";
>                         currentCultureInfo = new CultureInfo(culture);
>                         Thread.CurrentThread.CurrentUICulture = 
> currentCultureInfo;
>                         Thread.CurrentThread.CurrentCulture = 
> currentCultureInfo;
>                         
> MessageBox.Show(rm.GetString("SystemFolderNotAllowed_lbl"));
>
> The above code always return English locale text.
> Is it because I am not adding statellite assembly? If yes then how do I add 
> as after build I get MyCustomAction.CA.dll.
> Do I need to do some extra work to add localization in custom action?
>
> Thanks & regards,
> Rajesh
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to