#1,121 – Localization II – Assigning UIDs to All Localizable Elements

After adding a UICulture tag, the next step in localizing a WPF is to assign a UID (unique identifier) to each element in each of your XAML files.  These UIDs will later be used to localize/translate the XAML.

To start, press the Windows key, type Visual Studio, and click on the Visual Studio Tools icon.

1121-001

Double-click the Developer Command Prompt for VS2013 shortcut.

1121-002

In the command prompt, navigate to the directory containing your project (.csproj) file.  Enter the command:

msbuild /t:updateuid [yourapplication].csproj

1121-003

Open your project and then open one of your .xaml files.  You’ll see that each element now has a x:Uid attribute that wasn’t there before.  Each element will have a unique value for this attribute.

Before running msbuild:

1121-004

After running msbuild:

1121-005

Advertisements