Package Localization

Coordinator
Nov 6, 2011 at 5:59 PM

I started to write a preliminary spec for package localization http://nuget.codeplex.com/wikipage?title=Localization thinking through the requirements and scenarios.

I think Marcin raised this before, but there's an interesting question of how we deal with package contents that are localized vs metadata that's localized. At first, I thought I'd keep things simple and suggest that a localized package is the unit of localization. In other words, if you have package CoolStuff, you can also have CoolStuff es-ES for the spanish version of the package.
But then I thought of this scenario:

I'm in Japan, but am working on a site that targets English speakers and want to install AspNetMVC 4. When browsing the dialog, I want to see the metadata for the package in my language.

It occurred to me that the language that you want to target is different than the language the developer understands.

So, we could do one of the following:

  1. Stick with the original idea: If you are viewing packages in your language, you're also installing the package in your language. If you want to install the English package, temporarily switch your locale to English.
  2. Make this feature only about localizing metadata and packages that have localized contents must include all necessary resources.
  3. Separate the concept of metadata and package contents in such a way it's easy to view metadata in your language, but install packages targeted for another.

I'm leaning towards #1 since it seems the simplest.

Thoughts?

 

Nov 6, 2011 at 7:56 PM
Edited Nov 6, 2011 at 9:16 PM
You said

I'm in Japan, but am working on a site that targets English speakers and want to install AspNetMVC 4. When browsing the dialog, I want to see the metadata for the package in my language.

What is your language? English or Japanese?

Sent from my Windows Phone

 

Coordinator
Nov 6, 2011 at 8:26 PM
Japanese
Nov 6, 2011 at 9:28 PM

Yes, I prefer #1 too.

I also had a chat with Marcin about this feature. One thing we discussed is the concept of special relationship between a localized package and the neutral package of the same Id and same version. This is parallel to the concept of satellie assemblies in .NET. The benefits of doing so are:

  • If you release multiple languages for your packages, you can factor common content files and assemblies into the netrual package.
  • All dependencies are specified in the neutral package. When we walk the dependency graph, we only look for neutral packages. After we have formed the graph of packages to install, for each node in the graph, we install both the neutral package and the localized package.
  • If you don't want to release localized package, you continue to do what you do today.

Thoughts?

 

 

 

 

 

Coordinator
Nov 17, 2011 at 6:09 PM

I like that idea! J It’s pretty close to what I had in mind.