Localized packages

Feb 3, 2011 at 7:20 PM

A question came up last week about the possibility of adding support for localized packages, meaning that we show a package's description and title in the correct language according the OS locale or VS locale.

An option is to extend the .nuspec format to allow package author to specify additional <description> and other relevant elements for each supported language.

Thoughts?

Coordinator
Feb 3, 2011 at 10:13 PM

What do you propose? Multiple elements in the NuSpec format such as:

<title>The title in English</title>

<title lcid="es-ES">El titulo en espanol</title>

Also, once we define the format for NuSpec, we need to figure out the right way to express it in our OData feed.

Phil

Coordinator
Feb 4, 2011 at 12:39 AM

Or a better pattern might be to follow the VSIX pattern.

mypackage.nuspec
\es-ES
	\mypackage.nuspec.langpack
\ja-JP
	\mypackage.nuspec.langpack

The .nuspec.langpack files would only have the metadata fields for which it has localized content. So the es-ES file might have the metadata section with the <title> field localized, but nothing else. These langpack files would not have <dependencies> sections or <files> sections.

Thoughts?

Feb 4, 2011 at 1:23 AM
Edited Feb 4, 2011 at 1:24 AM

That sounds promising, though it may complicate the reader a little bit because we need to read multiple files.

A third option is to have a separate <metadata> section within nuspec. This is a variant of your first proposal.

<?xml version="1.0"?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
    <id>elmah</id>
    <version>12.3</version>
    <authors>azizatif</authors>
    <iconUrl>enter an icon here</iconUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>ELMAH (Error Logging Modules and Handlers) is an application-wide...</description>
    <summary>ELMAH (Error Logging Modules and Handlers) is an application-wide error...</summary>
    <dependencies>
       <dependency id="jQuery" version="3.0" />
    </dependencies>
  </metadata>
  
  <metadata locale="ja-jp" xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
    <description>ELMAH (Error Logging Modules and Handlers) is an application-wide...</description>
    <summary>ELMAH (Error Logging Modules and Handlers) is an application-wide error...</summary>
  </metadata>
</package>

 


Feb 4, 2011 at 5:50 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.