Combining LocBaml and resources in a single satellite assembly

His understanding is that the recommended approach to localization in WPF is to use the LocBaml tool to retrieve localizable elements, for example. csv file, translate the elements into the desired language and regenerate a new sattelite assembly from this CSV file. However, from my experiments, this seems to contradict the generation of satellite assemblies from resources.resx files, since none of them combines resources into a single resource file, but simply overrides any existing satellite assembly.

Is there a recommended approach (or even better, an existing tool) for performing a "merge" of output from LocBaml / generate and output of resgen in the resources.resx file (which VS builds by default). Does anyone face the same problems?

+5
source share
3 answers

You need to manually create the .resources generation from LocBaml, and then combine the Resx and BAML resources using the assembly linker.

The process looks something like this:

LocBaml.exe /generate ..\obj\WpfLocalization.g.en-US.resources 
            /trans:Res\de.csv /out:de /culture:de

REM Combine resource files w/ Assembly Linker
al /template:WpfLocalization.exe 
   /embed:de\WpfLocalization.g.de.resources 
   /embed:..\..\obj\WpfLocalization.Properties.Resources.de.resources   
   /culture:de  /out:de\WpfLocalization.resources.dll

(all on one line in a batch file).

, . , LocBaml , . -.

+3

WPF, codeplex, WPF.

, WinForms, , LocBaml.

+1

, LocBaml, , resource.resx locbaml ( al.exe).

Localization of WPF using LocBaml

The page describes three ways to use LocBaml, and I was looking for the last step in approach 3. This article has a lot of good stuff.

0
source

All Articles