如何使用图书馆中的全球资源

发布于 2024-09-13 16:21:47 字数 503 浏览 0 评论 0原文

我使用全局资源功能,不仅可以集中所有输出字符串,而且可以在使用本地化时变得简单(几乎 90% 的情况下)。

但我不仅将我的项目扩展到 ASP.NET 网站,还扩展到 2 个库项目。

我的问题是:

如何在这些库项目中使用 ASP.NET 全局资源文件

就好像我对

Resources.MyFilename.MyResourceStringName

图书馆不了解 MyFilename

替代文本 http://www.balexandre.com/temp/2010-08-12_1307.png

在这种情况下我应该做什么?

I use the Global Resources feature, not only to centralize all my output strings but to make it easy when using Localization (witch is almost 90% of the time).

But I spread out my project into, not only the ASP.NET website, but with 2 Library projects as well.

my question is:

How can I use the ASP.NET Global Resource file in those Library projects?

as If I do

Resources.MyFilename.MyResourceStringName

the Library as no knowledge of the MyFilename class

alt text http://www.balexandre.com/temp/2010-08-12_1307.png

What should I do in this cases?

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

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

发布评论

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

评论(1

七婞 2024-09-20 16:21:47

您必须使用 ResourceManager 类来完成此任务。

MSDN 资源管理器

Your going to have to use the ResourceManager class to accomplish this.

MSDN Resource Manager

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