The MergeLocalizationDirectives task merges the localization attributes and comments of one or more XAML binary format files into a single file for the whole assembly.
You can add localization attributes and comments to Extensible Application Markup Language (XAML) content. With Windows Presentation Foundation (WPF) localization support, you can strip out localization attributes and comments, and put them in a .loc file that is separate from the generated assembly. You can do this by using the LocalizationPropertyStorage attribute. For more information about localization attributes and comments, and LocalizationPropertyStorage, see Localization Attributes and Comments.
The following example merges the localization comments of several XAML binary format files into a single .loc file.
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="Microsoft.Build.Tasks.Windows.MergeLocalizationDirectives" AssemblyFile="C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationBuildTasks.dll" /> <Target Name="MergeLocalizationDirectivesTask"> <MergeLocalizationDirectives GeneratedLocalizationFiles="obj\debug\page1.loc;obj\debug\page2.loc;obj\debug\page3.loc" OutputFile="obj\debug\WPFMSBuildSample.loc" /> </Target> </Project>