Override the neutral language of a specific resource file in an assembly

I have an assembly containing several resource files. Most of them have a neutral language of "nl" (Dutch, which is indicated at the meeting as a neutral language), so I do not specify "nl" in my file names.

However, I put English lines in some other resource files (they are internal error messages), and I will never give a Dutch translation of them.

If I call these resource files something like "Errors.en.resx", the developer class is not generated (breaks the assembly) because there is no "Errors.resx". This is annoying because now I have to put the lines "en" in the "nl'-implied resource file" and I really don't want to translate these lines into "nl" or provide empty lines just to satisfy the compiler.

Is there a way to override the neutral language in a particular resource file, or perhaps somehow create a "design class" in Errors.en.resx?

+3
source share
1 answer

, , .

, static readonly, . get accessor, private static readonly.

+3

Source: https://habr.com/ru/post/1733668/


All Articles