{"id":4384,"date":"2008-06-10T15:27:06","date_gmt":"2008-06-10T15:27:06","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2008\/06\/10\/localizing-a-silverlight-application\/"},"modified":"2008-06-10T15:27:06","modified_gmt":"2008-06-10T15:27:06","slug":"localizing-a-silverlight-application","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/localizing-a-silverlight-application\/","title":{"rendered":"Localizing a Silverlight application"},"content":{"rendered":"<p>VS Silverlight beta2 adjusted its build functionalities to support the new Silverlight runtime localization model, which essentially is \u201cone language, one xap\u201d. This article provides the steps to take to build a localized app<\/p>\n<p>Let us say, you want to localize your app for the culture of \u201cja-jp\u201d. You have created several resource files and you want VS to pack the satellite assemblies into the .xap file. <\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image002_2.jpg\"><img decoding=\"async\" title=\"clip_image002\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"304\" alt=\"clip_image002\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2008\/06\/clip_image002_thumb.jpg\" width=\"331\" border=\"0\" \/><\/a><\/p>\n<p>1. In the solution explorer unload the Silverlight project and edit the project file. There is pre-created tag of \u201cSupportedCultures\u201d in the first property group tag. Fill in the culture value of \u201cja-jp\u201d, so you get \u201c&lt;SupportedCultures&gt;ja-jp&lt;\/SupportedCultures&gt;\u201d. Note, you can also fill in a culture list separated by \u201c,\u201d or \u201c;\u201d to support multiple cultures\/languages in the same xap file. For example you can fill in a string of \u201cja-JP;fr-FR\u201d. VS reads this list and only packs related satellite assembly folders. <\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image004_2.jpg\"><img decoding=\"async\" title=\"clip_image004\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"396\" alt=\"clip_image004\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2008\/06\/clip_image004_thumb.jpg\" width=\"682\" border=\"0\" \/><\/a><\/p>\n<p>2. Save the project file, reload it and then build it. You can open the .xap file generated under \u201cBinDebug\u201d to check out the content. You can see VS only packs the \u201cja-jp\u201d folder, but no \u201cja\u201d folder since it is not in the culture list.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image006_2.jpg\"><img decoding=\"async\" title=\"clip_image006\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"159\" alt=\"clip_image006\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2008\/06\/clip_image006_thumb.jpg\" width=\"244\" border=\"0\" \/><\/a><\/p>\n<p>3. If you would like to create a new xap file for a new culture, say \u201cde\u201d, you need to create new build configuration in VS and insert the tag of \u201c&lt;SupportedCultures&gt;de&lt;\/SupportedCultures&gt;\u201d into the related property group tag in the project file<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image008_2.jpg\"><img decoding=\"async\" title=\"clip_image008\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"369\" alt=\"clip_image008\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2008\/06\/clip_image008_thumb.jpg\" width=\"592\" border=\"0\" \/><\/a><\/p>\n<p>The project file change looks like,<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image010_2.jpg\"><img decoding=\"async\" title=\"clip_image010\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"111\" alt=\"clip_image010\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2008\/06\/clip_image010_thumb.jpg\" width=\"681\" border=\"0\" \/><\/a><\/p>\n<p>4. If you have a hosting web project, you are recommended to turn on the \u201ccopy to configuration specific folders\u201d through the \u201cSilverlight Applications\u201d tab in web\u2019s property page dialog. Just click the \u201cChange\u2026\u201d button. You can also enable it in the \u201cAdd Silverlight Application\u201d wizard when you create a new project. So different .xap files will stay underneath a separate subfolder, and they won\u2019t overwrite each other. <\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image012_2.jpg\"><img decoding=\"async\" title=\"clip_image012\" style=\"border-right: 0px;border-top: 0px;border-left: 0px;border-bottom: 0px\" height=\"345\" alt=\"clip_image012\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2008\/06\/clip_image012_thumb.jpg\" width=\"500\" border=\"0\" \/><\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/16\/2019\/02\/clip_image014_2.jpg\"><img decoding=\"async\" title=\"clip_image014\" style=\"border-right: 0px;border-top: 0px;border-left: 0px;border-bottom: 0px\" height=\"328\" alt=\"clip_image014\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2008\/06\/clip_image014_thumb.jpg\" width=\"309\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>VS Silverlight beta2 adjusted its build functionalities to support the new Silverlight runtime localization model, which essentially is \u201cone language, one xap\u201d. This article provides the steps to take to build a localized app Let us say, you want to localize your app for the culture of \u201cja-jp\u201d. You have created several resource files and [&hellip;]<\/p>\n","protected":false},"author":404,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[7310,7278,7302],"class_list":["post-4384","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-beta-2","tag-silverlight","tag-visual-studio-2008"],"acf":[],"blog_post_summary":"<p>VS Silverlight beta2 adjusted its build functionalities to support the new Silverlight runtime localization model, which essentially is \u201cone language, one xap\u201d. This article provides the steps to take to build a localized app Let us say, you want to localize your app for the culture of \u201cja-jp\u201d. You have created several resource files and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/4384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/404"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=4384"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/4384\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=4384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=4384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=4384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}