Microsoft Silverlight

Applications for Microsoft Silverlight are handled by the .NET parser (see Add-In for Microsoft .NET Programs).

Preparing the Silverlight project

Add unique identifiers ("Uids") to the localizable elements in the XAML file:
<StackPanel x:Uid="StackPanel_1">
<TextBlock x:Uid="TextBlock_1">Hello World</TextBlock>
</StackPanel>

This can be done manually or with the tool msbuild. This call add the Uids to all elements in a Visual Studio 2008 project:

msbuild /T:updateuid MyProject.csproj

If you have installed NET framework 3.5 you find the tool msbuild.exe at c:\windows\Microsoft.NET\Framework\v3.5..

More information can be found at http://msdn.microsoft.com/en-us/library/ms788718.aspx

Passolo Project

  1. Add the main assembly of your silverlight application (e.g. MyProject.dll) as source file to Passolo. The parser is "Add-In Microsoft .NET Parser".
  2. Add the target languages.
  3. Make sure, that all translation lists use the target path rule "Add-in Microsoft.NET Parser / .NET Assemblies".
  4. After translation and generating the target files, the target files must be specified in the existing file AppManifest.xaml. Each target file is specified as AssemblyPart.
    <Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       EntryPointAssembly="MyProject"
       EntryPointType="MyProject.App" RuntimeVersion="2.0.31005.0">
      <Deployment.Parts>
        <AssemblyPart x:Name="MyProject" Source="MyProject.dll" />
        <AssemblyPart x:Name="MyProject.resources" Source="de-DE/MyProject.resources.dll" />
      </Deployment.Parts>
    </Deployment>
  5. Create a new XAP file. This contains the same files as the XAP file that has been created by Visual Studio 2008 plus the target files with correct sub folder. E.g.
    MyProject.dll
    de-DE\MyProject.resources.dll
    AppManifest.xaml

If you use now the new XAP file instead of the old one, the Silverlight application shows the texts matching the system language.