Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I limit builds to only support EN "Microsoft.Expression.Interactions.resources.dll", and avoid DE, KR, FR, ES, etc...?

When I build my WPF Project, it creates several language folders, each containing "Microsoft.Expression.Interactions.resources.dll".

The weird thing is that I never created translations of my resource strings to other languages, and yet it still creates DE, KR, FR, ES folders. What I just need is EN.

How can I limit the localization to just EN?

like image 777
thenonhacker Avatar asked Dec 07 '11 05:12

thenonhacker


2 Answers

You're seeing those files because you're using the Blend SDK for .NET (either directly or through the Prism library). That SDK includes localized resources thus they get included in your build output.

Here's how you create a Silverlight build that targets a specific culture. It should work the same way for WPF. The jist of it is:

  1. Make a new configuration in your solution.
  2. Edit each project file to specify the SupportedCulture as "en" (note the casing).

If your solution is quite large this could be a lot of work. Honestly it doesn't harm anything to have this additional files in a WPF application -- they simply take up a little more disk space. You could also only archive and ship the en culture resources. Assuming you've defined your NeutralResourcesLanguage as en your the application will always be able to find its resources (they'll just be in English).

like image 129
Mike Post Avatar answered Nov 09 '22 17:11

Mike Post


@Mike-Post solution didn't work for me :( Maybe because VS2012. I added <SupportedCultures>en</SupportedCultures> but nothing changed and also there was a warning that it is invalid element.

But here is another solution: http://social.msdn.microsoft.com/Forums/vstudio/en-US/feb23879-660d-43d1-93ef-90a63eef70c6/how-can-i-remove-localization-information-from-my-wpf-project

just delete these folders (except en maybe) from Program Files (x86)\Microsoft SDKs\Expression\Blend\.NETFramework\v4.0\Libraries

like image 38
Alex P. Avatar answered Nov 09 '22 17:11

Alex P.