views:

31

answers:

1

Hi, I've a quite obvious problem. Here's the situation: - my WPF application is primarily written in German - I've to use resx-files (standard way in the company) - the fallback-language must be English. - the german resources are the base for all translations (including English)

I've tried many combinations with "[assembly: NeutralResourcesLanguage("en", UltimateResourceFallbackLocation.Satellite)]" and setting in the csproj file, but unfortunately, I couldn't find one that works fine.

Thx in advance for your help! Fred

+1  A: 

If the English resources will always have fallback values, I'd recommend embedding that language into the main assembly itself. This way you can use:

[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.MainAssembly)]

For this to work, remove the change you did to the csproj. Also note that the language you set must not be neutral, in spite of the attribute name (i.e. use en-US instead of en)

This way, satellite assemblies will only be generated for languages other than English.

You can read more here: http://compositeextensions.codeplex.com/Thread/View.aspx?ThreadId=52910

Julian Dominguez
Hi,That's the problem. The Main Assembly is build BEFORE all other localized assemblies. And the only resources I have during the main compilation are the German resources! Then, on the next step, the other localized assemblies will be build on the base of the German assembly.
Fred