Skip to content

Latest commit

 

History

History
60 lines (50 loc) · 2.79 KB

mergelocalizationdirectives-task.md

File metadata and controls

60 lines (50 loc) · 2.79 KB
title ms.date ms.topic dev_langs helpviewer_keywords ms.assetid author ms.author manager ms.workload
MergeLocalizationDirectives Task | Microsoft Docs
11/04/2016
reference
VB
CSharp
C++
jsharp
localizing XAML [WPF MSBuild], moving comments and attributes to a separate file
MergeLocalizationDirectives task [WPF MSBuild], parameters
MergeLocalizationDirectives task [WPF MSBuild]
moving localization comments and attributes to a separate file [WPF MSBuild]
9095b4f1-88da-4194-914b-ee1456826830
ghogen
ghogen
jillfra
multiple

MergeLocalizationDirectives task

The xref:Microsoft.Build.Tasks.Windows.MergeLocalizationDirectives task merges the localization attributes and comments of one or more XAML binary format files into a single file for the whole assembly.

Task parameters

Parameter Description
GeneratedLocalizationFiles Required ITaskItem[] parameter.

Specifies the list of localization directives files for individual files in XAML binary format.
OutputFile Required String output parameter.

Specifies the output path of the compiled localization-directives assembly.

Remarks

You can add localization attributes and comments to 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.

Example

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>

See also