C#:更改资源文件而不重新构建?

发布于 2024-12-13 16:32:45 字数 573 浏览 3 评论 0原文

对于 Asp.Net MVC 3 应用程序,我将使用资源文件来存储我的 I18N( 操作方法)。

我不会翻译所有语言的所有字段,我只需用一种语言创建并为其他两种语言创建空语言文件。在实现中我将使用这三个文件。

因此,对于开发来说,我没有任何问题,但在我创建网站后,客户将翻译所有这些字段。我发现了一个很棒的应用程序,它允许从一个 resx 转换为另一个 resx ( SimpleResxEditor )。但是现在,客户如何在没有 Visual Studio 的情况下更改 ASP.NET 网站中的这个 resx 文件呢?有没有办法在 Visual Studio 中指定我们使用“非嵌入”资源文件,并且更改此文件将立即生效?

For an Asp.Net MVC 3 application, I will a use resources files to store my I18N( How-to ).

It's not me which will translate all fields in all languages, I just have to create in one language and create empty language files for the two other languages. And in the implementation I will use those three files.

So for the development I've not any problem, but after I've created the website, it's the customer which will translate all those fields. I found a great app which allows to translate from one resx to one other ( SimpleResxEditor ). But now, how can the customer change this resx file in the asp.net website without visual studio? Is there a way to specify in visual studio that we use a "not-embedded" resource file, and changing this file will takes an immediate effect?

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

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

发布评论

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

评论(1

岛徒 2024-12-20 16:32:45

您必须首先通过 resgen 创建资源文件:

resgen InternationalResources.resx

输出是一个 .resources 文件。

之后,您必须通过 al.exe 将资源链接到程序集:

al.exe 
/t:lib 
/culture:de-AT 
/out:"\LocalizeableConsole.resources.dll" 
/embed:InternationalResources.resources,LocalizeableConsole.InternationalResources.de-AT.resources 
/template:"LocalizeableConsole.exe"
/keyf:KeyFile.snk

You have to create the ressource file via resgen first:

resgen InternationalResources.resx

Output is a .resources file.

After the you have to link the ressource to the assembly via al.exe:

al.exe 
/t:lib 
/culture:de-AT 
/out:"\LocalizeableConsole.resources.dll" 
/embed:InternationalResources.resources,LocalizeableConsole.InternationalResources.de-AT.resources 
/template:"LocalizeableConsole.exe"
/keyf:KeyFile.snk
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文