Avalon is a graphical subsystem in .NET Framework 3.0 (formerly called WinFX) which uses a markup language, known as XAML for rich user interface development. WPF is included with Windows Vista and Windows Server 2008, and is also available for Windows XP Service Pack 2 or later, and Windows Server 2003.
Localizing a WPF application with Visual Localize is much easier and more comfortable than translating it directly in Visual Studio oder in a text editor.
When you need to translate a typical WPF application, you can:
* outsource the texts to be translated into XML files,
* store the texts to be translated into RESX tables or
* use WPF XAML files.
From version 7.5+, Visual Localize supports translation of binary XAML files(BAML) contained in the .NET Base Assemblies.
When the files have been translated with Visual Localize, you can either create a new set of .NET Base Assemblies or store the files into new .NET Satellite Assemblies.
1. Creating UIDs
Before translating your WPF application, it is imperative to define UIDs for your XAML files. The Microsoft WPF localization API requires these UIDs to ensure a correct workflow. UIDs are used to track changes and identify elements which need translation. In order to add UIDs to your files, please run the following parameter on your Visual Studio project:
msbuild /t:updateuid MyProject.csproj
This is the recommended method of adding UIDs. Adding them manually is very time-consuming and less accurate.
NOTE: Elements without UID will NOT be visible in Visual Localize and cannot be translated.
2. Checking the UIDs
Use the following command to check whether the UIDs have been assigned correctly:
msbuild /t:checkuid MyProject.csproj
After you have run the parameter updateuid, your XML files should contain UIDs. For example:
<TextBlock x:Uid="TextBlock_1" xml:lang="en-us" Text="Are you German?" />
3. Localizing WPF applications
After you have configured your software application, you can build your application and include the compiled files (*.exe, *.dll) in a Visual Localize localization project (*.prj) to translate them.