动态加载WPF卫星资源
我读过有关 WPF 本地化中使用的卫星程序集的信息。但是,我想问是否有一种方法可以加载卫星程序集,而无需遵循取决于语言的预定义目录结构(例如,如果系统语言是英语,则 WPF 应用程序会查找卫星程序集在“en-US”子文件夹内)。
这是因为我想在分发软件包时简单地交换卫星程序集,而不必为每种语言创建保存程序集的特定文件夹。我只想将卫星程序集和主要可执行文件放在同一目录中。
这是否可能,是否有一种简单的方法可以做到这一点,例如只需在应用程序启动时加载资源文件一次?
谢谢!
I've read about satellite-assemblies being used in WPF localizations. However, I would like to ask if there is a way to load the satellite-assemblies without following the pre-defined directory structure that depends on the language (ex. If the system language is English, the WPF application looks for the satellite-assembly inside the "en-US" subfolder).
This is because I would like to simply swap the satellite-assemblies when distributing the software package without having to create a specific folder per language that would hold the assemblies. I would just like to have the satellite-assembly and the main executable in the same directory.
Is this possible and is there even an easy way to do this like simply loading the resource file on application startup once?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,您必须使用目录。
No, you are stuck with using the directories.