资源文件和卫星 DLL 有什么区别?

发布于 2024-07-28 05:11:33 字数 29 浏览 1 评论 0原文

我不明白资源文件和卫星 dll 之间的区别。

I am not getting the difference between resource files and satellite dll.

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

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

发布评论

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

评论(2

不醒的梦 2024-08-04 05:19:36

它们非常相似,Satelite Dlls 用于翻译资源。

They are very similar, Satelite Dlls are for Translated resources.

萌辣 2024-08-04 05:16:59

资源文件通常会编译到应用程序中。 卫星DLL是一个DLL,它包含应用程序的所有资源,此外,通过其特殊的命名法可以根据国家模式(即区域设置)进行加载。

409 : LocaleID for English (United States)
40C : LocaleID for French (Standard)

当我将我的 dll 命名为 testSAT40C.dll 时,当我选择法国的区域设置时,它将被加载。

然后,您可以使用以下命令获取资源。

     If (LoadLocalizedResources) Then

        ' Pull a string resource out of a local resource
        ' object for demonstration purposes.
        Command1.Caption = GetString(101)
     End If

有关完整示例(包括函数 GetString 和 LoadLocalizedResources 的代码),请查看此处< /a>. (我知道示例是用 VB6 编写的,但很容易移植到其他语言。)

Ressource files usually get compiled into the application. A satellite dll is a dll, that includes all the ressources of an application and in addition, through its special nomenclature can be loaded based on the country schema, that is regional settings.

409 : LocaleID for English (United States)
40C : LocaleID for French (Standard)

When I name my dll testSAT40C.dll, it will be loaded when I'm working when selecting regional settings for France.

You can then get ressoirces using

     If (LoadLocalizedResources) Then

        ' Pull a string resource out of a local resource
        ' object for demonstration purposes.
        Command1.Caption = GetString(101)
     End If

For a complete example (including the code for the functions GetString and LoadLocalizedResources) look here. (I know the sample is in VB6, but easy enough to port to other languages.)

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