如何通知我的应用程序在传递不明白的文化时使用哪个resx文件? (WPF)

时间:2022-07-30 07:21:05

Subject says it all. I have Resources.en-US.resx, Resources.de-DE.resx, etc. I don't ever want the basic Resources.resx file to be referenced. If someone passes me a language that I don't have a resx for I want it to drop back and use Resources.en-US.resx. Anyone?

主题说明了一切。我有Resources.en-US.resx,Resources.de-DE.resx等。我不希望引用基本的Resources.resx文件。如果有人通过了我没有resx的语言,我希望它退回并使用Resources.en-US.resx。任何人?

1 个解决方案

#1


Use the NeutralResourcesLanguageAttribute:

使用NeutralResourcesLanguageAttribute:

[assembly: NeutralResourcesLanguageAttribute("en-US" , UltimateResourceFallbackLocation.Satellite)]

#1


Use the NeutralResourcesLanguageAttribute:

使用NeutralResourcesLanguageAttribute:

[assembly: NeutralResourcesLanguageAttribute("en-US" , UltimateResourceFallbackLocation.Satellite)]