未拾取 WPF 卫星程序集
我有一个演示应用程序,在其中我使用了具有多种语言的第三方库。为了测试本地化是否有效,我将 CurrentUICulture 设置为荷兰语:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("nl-NL");
我还在 Properties.Resources.Get[xxx] 上设置了一个断点,以便我可以看到发生了什么。因此,当我到达该断点时,我注意到这些模块已加载:
output\Catel.Windows.dll
output\nl\Catel.Windows.resources.dll
这看起来不错(他选择了 nl 语言,并将卫星程序集作为模块加载)。但是,资源管理器不断返回资源的英文版本...
当我在反射器中打开荷兰卫星组件时,我可以看到荷兰资源,因此卫星组件看起来不错。
I have a demo app, and in it I use a 3rd party library that has several languages. To test whether the localization works, I set the CurrentUICulture to dutch:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("nl-NL");
I also set a breakpoint on the Properties.Resources.Get[xxx] so I can see what is going on. So, when I hit that breakpoint, I notice these modules are loaded:
output\Catel.Windows.dll
output\nl\Catel.Windows.resources.dll
Which seems good (he picked up the nl language, and loaded the satellite assembly as module). However, the resource manager keeps returning the english version of the resource...
When I open the dutch satellite assembly in reflector, I can see dutch resources, so the satellite assembly looks fine.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我至少发现了问题。在我的程序集中,我将翻译放在名为 Translations 的 Properties 文件夹的子文件夹中,这样我的 Properties 文件夹就不会充满这些文件。但是,这会破坏程序集
ok, I at least found the issue. In my assemblies, I put the translations in a subfolder of the Properties folder called Translations so my Properties folder doesn't get full of these files. However, that breaks the assemblies