我是否可以通过更改 dll 所在文件夹的名称,在操作系统中将一种语言的卫星资源程序集用于另一种语言?

发布于 2024-09-28 14:22:18 字数 281 浏览 1 评论 0原文

如果我使用本地化资源编译 .NET 附属程序集,程序集本身是否知道它适用于哪种语言,或者这是否隐含在它出现的文件夹中?

如果我决定创建一个本地化程序集,其中所有字符串都用“@”符号括起来,以测试我的所有应用程序是否已本地化,然后将其安装在 EN-GB 操作系统上的“en”子文件夹中并加载应用程序并我看到所有符号都用“@”符号括起来,然后我可以在德国操作系统上使用相同的程序集,但将其放在“de”子文件夹中并期望它仍然本地化应用程序吗?或者程序集编译中是否有某些东西嵌入了程序集的语言环境,因此即使它在正确的位置找到它也不会加载它?

If I compile a .NET satellite assembly with localised resources, does the assembly itself know which language it is for, or is this implied in the folder in which it appears?

If I decide to create a localised assembly where all strings are enclosed by '@' symbols for testing if all of my app is localised and then install that on an EN-GB OS in an 'en' sub folder and load the app up and I see all my symbols enclosed by '@' signs, can I then use the same assembly on a German OS, but put it in a 'de' subfolder and expect it to still localise the app? Or is there something in the assembly compilation which embeds the locale that the assembly and so even if it finds it in the right place it will not load it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

习惯成性 2024-10-05 14:22:18

附属程序集在文件头中包含区域性信息。所以你的问题的答案是否定的,你不能只重命名文件夹。

Satellite assemblies contain culture information in file header. So the answer to your question is simply no, you cannot just rename the folder.

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