-
Notifications
You must be signed in to change notification settings - Fork 252
NuGet Localization Design
Design a localization strategy for NuGet package authors.
Currently NuGet does not provide a strategy for shipping localized version of package for transitive project systems.
We do have official strategy for Packages.Config
project documented here.
As part of sprint task we discussed the following strategies for creating localized packages -
In this scenario, all the satellite assemblies can be part of the same package -
lib
└───target_framework
│ Code.dll
│
├───culture_1
│ Code.resources.dll
│
└───culture_2
Code.resources.dll
In this scenario, all the satellite assemblies can be part of the new package which will deliver all the satellite assemblies as their pay load and should contain a package reference to the original package.
Original package structure -
CodePackage.nupkg
└───lib
└───target_framework
Code.dll
Original package usage -
...
<ItemGroup>
<PackageReference Include="CodePackage" Version="1.0.0"/>
</ItemGroup>
...
Satellite package structure -
CodePackage.Localized.nupkg
└───lib
└───target_framework
├───culture_1
│ Code.resources.dll
│
└───culture_2
Code.resources.dll
Satellite package usage -
...
<ItemGroup>
<PackageReference Include="CodePackage.Localized" Version="1.0.0"/>
</ItemGroup>
...
In this scenario, all the satellite assemblies can be part of the separate packages, one for each culture. The satellite packages will deliver all the satellite assemblies as their pay load and should contain a package reference to the original package.
Original package structure -
CodePackage.nupkg
└───lib
└───target_framework
Code.dll
Original package usage -
...
<ItemGroup>
<PackageReference Include="CodePackage" Version="1.0.0"/>
</ItemGroup>
...
Satellite package structure -
CodePackage.Localized.culture_1.nupkg
└───lib
└───target_framework
└───culture_1
Code.resources.dll
CodePackage.Localized.culture_2.nupkg
└───lib
└───target_framework
└───culture_2
Code.resources.dll
Satellite package usage -
...
<ItemGroup>
<PackageReference Include="CodePackage.Localized.culture_1" Version="1.0.0"/>
<PackageReference Include="CodePackage.Localized.culture_2" Version="1.0.0"/>
</ItemGroup>
...
Check out the proposals in the accepted
& proposed
folders on the repository, and active PRs for proposals being discussed today.