Localization in Silverlight
how do I use localization in Silverlight?
since there are no local resource files in silverlight like ASP.Net. I am stuck at how 开发者_运维知识库would I do this?
any ideas?
Google returns many results:
- MSDN
- Project in Codeplex
- Localization in Silverlight 4.0
Silverlight aplications are deployed as XAP files that are actually ZIP files that contains the assemblies, resources and medata of the application. If you want to localize a Silverlight application you have to add the satellite assemblies into the XAP file and then modify the metadata file to include satellite assembly files.
For example if you have MyApplication.xap that contains:
- MyApplication.dll
- AppManifest.xaml
and you want to localize it to German add
- de\MyApplication.resources.dll
and add following line to AppManifest.xaml
<AssemblyPart Source="de/MyApplication.resources.dll"/>
To get the German satellite assembly file use Visual Studio or some localization tool.
精彩评论