Web PI Localization

Version 2 RTW of Web Platform Installer, released in September, now not only comes localized in 9 languages - English, German, French, Spanish, Russian, Italian, Japanese, Korean, Traditional and Simplified Chinese, but also supports installations of products in supported languages. Now, users can choose the language in which they want Web PI to install the products. Though, not all products are localized in all 9 languages. Those products that are not available in the language selected by the user or not localized at all, will be offered in English.

This article will talk about the following:

With extensibility added to Web PI story, the users will also be able to install custom products in different languages. To read about extensibility refer to the following articles:

The display language of Web PI UI

If your system display language is one of the nine Web PI supported languages, Web PI will automatically show up translated in your display language. To change or install a display language (Vista and above) go to Control Panel-->Regional and Language Options-->Install or Uninstall display languages, install a display language from the original installation CD, restart the machine and enjoy your operating system in your preferred language… along with Web PI localized in the same language, given it is one of the supported languages.

The language of products

Now, Web PI offers products that are available in more than one language. However, not all products are available in multiple languages and not all products that support more than one language, support all other 9 Web PI supported languages. Below is the matrix of products offered with Web PI v2 RTW and languages these products are localized in.
Title French Spanish German Japanese Korean Simplified
Chinese
Traditional
Chinese
Italian Russian

Administration Pack 1.0

x x x x          

Application Request Routing 1.0

x x x x          

Database Manager 1.0

x x x x          

External Cache 1.0

x x x x          

FTP Publishing Service 7.5

x x x x          

PowerShell Snap-in For IIS7 1.0

x x x x          

IIS Media Services 2.0

x x x x          

Remote Admin Manager for IIS7 1.0

x x x x          

Silverlight 3 Tools for Visual Studio

x x x x x x x x  

SQL Server Express 2008 with Service Pack 1

x x x x x x x x x

SQL Server 2008 Express with Advanced Services

x x x x x x x x x

SQL Server 2008 Express with Tools

x x x x x x x x x

SQL Server 2008 Management Studio Express

x x x x x x x x x

Web Deployment Tool 1.0 RC

x x x x x x x x x

Visual Web Developer 2008 Express with SP1

x x x x x x x x x

WebDav 7.5

x x x x          

Web Farm Framework 1.0

x x x x          

URL Rewrite 1.1

x x x x          

To make Web PI offer products in a language other than English, go to Options dialog and select the language for your installations:

clip_image002

Once you choose a language other than English for your installations, Web PI UI will show you the same set of products with the only difference, that those products that are not available in the language you have chosen, will have “(English)” next to their title suggesting that if you pick those, they will install in English.

image


Custom products and localization

It was briefly covered in previous articles about extensibility, how to make a custom product localizable in more than one language. Let’s take a sample feed from that article and get it localized.

In the example below, SampleProduct is localized in Italian – both in display language and installer. Note, how you have to add a unique (across all Web PI) resource name id to each element you want to translate: resourceName="" and then reference it in your translation xml.

<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">
  <version>1.0.0</version>
  <title>Sample Product WebPI v2 RTW Feed</title>
  <link href="http://www.contoso.com/SampleProductFeed.xml" />
  <updated>2009-9-29T16:30:00Z</updated>
  <author>
    <name>Sample Product Builder</name>
    <uri>http://www.contoso.com</uri>
  </author>
  <id>http://www.contoso.com/SampleProductFeed.xml</id>

  <resourcesList>
    <resources>
      <culture>en</culture>
    </resources>
    <resources>
      <culture>it</culture>
      <url>http://www.contoso.com/SampleProduct_it.xml</url>
    </resources>
  </resourcesList>
  
  <entry>
    <productId>SampleProduct</productId>
    <title resourceName="Entry_SampleProduct_Title">Sample Product</title>

    <summary resourceName="Entry_SampleProduct_Summary">Just summary</summary>
    <longSummary resourceName="Entry_SampleProduct_LongSummary">Long summary of SampleProduct</longSummary>
    <productFamily>Sample Products</productFamily>

    <version>1.0.0</version>
    <images>
      <icon>c:\SampleProductIcon.png</icon>
    </images>
    <author>
      <name>Sample Product Builder</name>
      <uri>http://www.contoso.com</uri>
    </author>
    <published>2009-9-29T12:30:00Z</published>
    
    <!-- How can WebPI know your product is installed? -->
    <discoveryHint>
      <or>
        <!-- 1. Through registry (version value should be 1.0.0, if dont care about the verion, should be just keypath) -->
        <discoveryHint>
          <registry>
            <keyPath>HKEY_LOCAL_MACHINE\SOFTWARE\SampleProduct\Sample Product Version 1.0.0</keyPath>
            <valueName>Version</valueName>
            <valueValue>1.0.0</valueValue>
          </registry>
        </discoveryHint>
        <discoveryHint>
          <file>
            <!-- 2. Through filepath - if the exe is at this location, WebPI will know that SampleProduct is installed -->
            <filePath>%ProgramFiles%\SampleProduct\SampleProduct.exe</filePath>
          </file>
        </discoveryHint>
      </or>
    </discoveryHint>

    <!-- 
         What products need to be installed first? 
         Define dependencies through ProductId property of products
         declared in the main WebProductList file or other previously 
         added feeds 
    -->
    <dependency>
      <productId>IISManagementConsole</productId>
    </dependency>

    <!-- SampleProduct cannot be installed if product IncompatibleSampleProduct is already installed -->
    <incompatibilities>
      <incompatibleProduct>
        <productId>IncompatibleSampleProduct</productId>
      </incompatibleProduct>
    </incompatibilities>

    <!-- 
         installers and installer commands. Here you can define separate installers for
         different architectures, OSes, SKUs and languages
    -->
    <installers>
      <installer>
        <!-- installer Id should be unique for every SampleProduct installer -->
        <id>1</id>

        <!-- English installer -->
        <languageId>en</languageId>

        <!-- same English installer for both x86 and x64 -->
        <architectures>
          <x86 />
          <x64 />
        </architectures>

        <!-- 
             list of OSes and SKUs this product can be installed on. On every OS/SKU that is not 
             supported, the product will not display 
        -->
        <osList>
          <os>
            <!-- the product is supported on Vista/Windows Server SP1 + -->
            <minimumVersion>
              <osMajorVersion>6</osMajorVersion>
              <osMinorVersion>0</osMinorVersion>
              <spMajorVersion>0</spMajorVersion>
            </minimumVersion>

            <!-- list of SKUs -->
            <osTypes>
              <Server />
              <HomePremium />
              <Ultimate />
              <Enterprise />
              <Business />
            </osTypes>
          </os>
        </osList>

        <!-- before the user will install the product, the link to the following EULA will be presented -->
        <eulaURL>http://www.contoso.com/eula.html</eulaURL>

        <!-- this info is important for WebPI to verify that the downloaded file was not tampered -->
        <installerFile>
          <!-- size in KBs -->
          <fileSize>1024</fileSize>
          <installerURL>http://www.contoso.com/SampleProduct_EnglishInstaller.msi</installerURL>
          <sha1>111222FFF000BBB444555EEEAAA777888999DDDD</sha1>
        </installerFile>

        <!-- how should WebPI install your product? -->
        <installCommands>
          <msiInstall>
            <msi>%InstallerFile%</msi>
          </msiInstall>
        </installCommands>
      </installer>

      <!-- x64 architecture installer -->
      <installer>
        <!-- installer Id should be unique for every SampleProduct installer -->
        <id>2</id>

        <!-- Italian installer -->
        <languageId>it</languageId>
        
        <!-- same Italian installer for both x86 and x64 -->
        <architectures>
          <x86 />
          <x64 />
        </architectures>

        <osList>
          <os>
            <!-- the product is supported on Vista/Windows Server SP1 + -->
            <minimumVersion>
              <osMajorVersion>6</osMajorVersion>
              <osMinorVersion>0</osMinorVersion>
              <spMajorVersion>0</spMajorVersion>
            </minimumVersion>

            <!-- list of SKUs -->
            <osTypes>
              <Server />
              <HomePremium />
              <Ultimate />
              <Enterprise />
              <Business />
            </osTypes>
          </os>
        </osList>

        <!-- before the user will install the product, the link to the following EULA will be presented -->
        <eulaURL>http://www.contoso.com/eula.html</eulaURL>

        <!-- this info is important for WebPI to verify that the downloaded file was not tampered -->
        <installerFile>
          <!-- size in KBs -->
          <fileSize>1024</fileSize>
          <installerURL>http://www.contoso.com/SampleProduct_ItalianInstaller.msi</installerURL>
          <sha1>111222FFF000BBB444555EEEAAA777888999DDDD</sha1>
        </installerFile>

        <!-- how should WebPI install your product? -->
        <installCommands>
          <msiInstall>
            <msi>%InstallerFile%</msi>
          </msiInstall>
        </installCommands>

      </installer>
    </installers>
  </entry>

  <!-- define a tab that contains SampleProduct -->
  <tabs>
    <tab>
      <pillarTab>
        <id>SampleTab</id>
        <name>Sample Tab</name>
        <description>My sample tab for my sample product</description>
        <pillar>
          <id>SampleProduct</id>
          <name>Sample Pillar</name>
          <description>Install sample product</description>
          <groupingId>SampleProductFamilyGrouping</groupingId>
          <recommended>
            <productId>SampleProduct</productId>
          </recommended>
        </pillar>
      </pillarTab>
    </tab>
  </tabs>

  <groupings>
    <grouping>
      <id>SampleProductFamilyGrouping</id>
      <!-- combine products based on their productFamily attributes -->
      <attribute>productFamily</attribute>
      <include>
        <item>Sample Products</item>
      </include>
    </grouping>
  </groupings>
</feed>

And SampleProduct_it.xml referenced in the resource list will have to look something like this:

<?xml version="1.0" encoding="utf-8"?>
<root>
  <data name="Entry_SampleProduct_Title" xml:space="preserve">
    <value>SampleProduct Title in Italian</value>
  </data>
  <data name="Entry_SampleProduct_Summary" xml:space="preserve">
    <value>SampleProduct Summary in Italian</value>
  </data>
  <data name="Entry_SampleProduct_LongSummary" xml:space="preserve">
    <value>SampleProduct Long Summary in Italian</value>
  </data>
</root>

Conclusion: to get all resource strings in your xml file localized, you need to point Web PI to another xml with all the translations. Resource section in resourceList of the first xml takes care of this. If you have your custom product available in more than one language, you can have a different installer for each of your supported language and hint Web PI with <languageId> element in your installer portion of the product definition, which installer to use for which language.

No Comments