Localization with Satellite Assemblies via ResGen.exe and Al.exe

Add-in Express™ Support Service
That's what is more important than anything else

Localization with Satellite Assemblies via ResGen.exe and Al.exe
 
thiede




Posts: 40
Joined: 2016-07-05
Hi,

because our customer wants to create his own localization I want to provide a way to create Satellite Assemblys via ResGen.exe and Al.exe.

In my AssemblyInfo I add

    [assembly: NeutralResourcesLanguage("en", UltimateResourceFallbackLocation.Satellite)]

I have two Resource Files:

- OutlookModule.resx
- Resources.resx

For each language I have copies of these resources.
To create the satellite assemblies I call for each language (de,en,fr)

resgen OutlookModule.de.resx OutlookModule.de.resources
resgen Resources.de.resx Resources.de.resources

and

al /out:deOptimalSystems.Integration.OutlookAddin.resources.dll /culture:de /embed:Resources.de.resources /embed:OutlookModule.de.resources

If I replace the satellite assemblies e.g. in bin/Release/en and start my Outlook then my Add-In is not loaded. There is no exception in the adxloader.log.
I find that the satellite assemblies has different sizes created by Visual Studio versus by resgen.exe and al.exe.

By Visual Studio:
for english is 26.5 kb
but for german it only 8 kb.

By Resgen.exe and al.exe
for all languages 6.5 kb.

Did I miss a parameter?
Posted 13 Feb, 2017 04:40:14 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hello,

To support UI with different languages please use the Localizable property of the addinmodule.
Posted 14 Feb, 2017 06:08:39 Top
thiede




Posts: 40
Joined: 2016-07-05
Hi,

I use this Localizable property and localize it via Visual Studio Designer of the OutlookModule. Works fine. For out messages I use a second resource. Building it works. Switching language e.g. in OnHostApplicationInitialize works. But our Customer wants to localize the Add-In on their own. Therefore they need the OutlookModule.fr.resx and the Resource.fr.resx to translate it and build the satellite assembly. I tried to provide a way via resgen.exe and al.exe but Visual Studio seems to create another satellite assembly. Do you know how to create the same one?
Posted 14 Feb, 2017 06:20:58 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Thiede,

thiede writes:
because our customer wants to create his own localization I want to provide a way to create Satellite Assemblys via ResGen.exe and Al.exe.


I assume the localization properties provided by the add-in module (as well as by System.Windows.forms.Form) works using the satellite assembly model. You can try to make it work in the way you like but I suppose this may be impossible.

What is doable is your creating a self-made localization system that uses resources and which can be switched to this or that language by you. Say, you can specify the locale-specific strings and use them when setting properties of a Ribbon control.

I feel like I may misunderstand something.


Andrei Smolin
Add-in Express Team Leader
Posted 14 Feb, 2017 07:34:15 Top
thiede




Posts: 40
Joined: 2016-07-05
Hi,

I feel like I may misunderstand something.


The szenario is very simple. We provide our Add-In for german and english. Therefore we create a satellite assembly for de and en using Localizable property of the addinmodule.

The customer wants to create a third localisation e.g. for france, chinese, protugies. Therefore we want to provide our resx files let him build the satellite assemblies for the languages he wants to.

Whats the different between the way Visual Studio or MSBuild creates the satellite assemblies and the way using resgen.exe and al.exe?
Posted 14 Feb, 2017 09:05:20 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Thiede,

thiede writes:
The customer wants to create a third localisation e.g. for france, chinese, protugies. Therefore we want to provide our resx files let him build the satellite assemblies for the languages he wants to.


.RESX files is are development-phase files. Do you pass the complete add-in project to them so that they become an actual add-in developer? If so, they can specify a new value in the Language property of the add-in module (this will create a new .RESX file), type captions using the new language, and rebuild the add-in.

thiede writes:
Whats the different between the way Visual Studio or MSBuild creates the satellite assemblies and the way using resgen.exe and al.exe?


Sorry, I have no idea.


Andrei Smolin
Add-in Express Team Leader
Posted 15 Feb, 2017 05:34:47 Top
thiede




Posts: 40
Joined: 2016-07-05
Hi Andrei,

I do not pass the complete add-in project to the customer. I pass a setup.msi with the result outlookmodule.dll, adxloader.dll etc. And I will pass the resx files to enable him to translate. And I will give him a resgen.exe and a al.exe to generate the satellite assemblies only and put them into the correct installation folder.

The customer doesn't have a development environment.
Posted 16 Feb, 2017 06:00:34 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Thiede,

I seem to understand what you do. I don't know what causes the issue. I wonder if it is reproducible on a Windows Forms application. If it is reproducible, I suggest that you find a forum to ask this question. I suppose you would find such a forum among Microsoft forums.

I also suggest using ILDASM to find out if a reference to resources (in the add-in assembly's manifest) is supplied with a hash or PublicKeyToken. If so, replacing the language assemblies doesn't seem possible.


Andrei Smolin
Add-in Express Team Leader
Posted 16 Feb, 2017 09:40:29 Top