动态加载WPF卫星资源

发布于 2024-08-21 18:41:15 字数 267 浏览 5 评论 0原文

我读过有关 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南冥有猫 2024-08-28 18:41:15

不,您必须使用目录。

No, you are stuck with using the directories.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文