What is the Neutral Language setting used for?

2019-04-03 05:58发布

问题:

You can find the setting accessing:

WinForms Application Properties->Application->Assembly Information->Neutral Language

回答1:

I believe it sets the NeutralResourcesLanguageAttribute for the assembly. From the docs:

The NeutralResourcesLanguageAttribute informs the ResourceManager of the language used to write the neutral culture's resources for an assembly, and can also inform the ResourceManager of the assembly to use (either the main assembly or a satellite assembly) to retrieve neutral resources using the resource fallback process. When looking up resources in the same culture as the neutral resources language, the ResourceManager automatically uses the resources located in the main assembly, instead of searching for a satellite assembly with the current user interface culture for the current thread. This will improve lookup performance for the first resource you load, and can reduce your working set.

Does that help? You might also want to look at Kim Hamilton's blog post on the topic.



回答2:

The neutral language is used for determining which language resource that will be used when no resources are found for the language in which the application is currently run. This is called the "resource fallback process" (scroll down a bit on the page for more info).