[英]how to add many resources in folder app_localresources?
In Visual Studio, I have the folder app_localresource s with 2 resources: example.aspx.resx and example.aspx.en.resx. 在Visual Studio中,我有2个资源的app_localresource文件夹:example.aspx.resx和example.aspx.en.resx。 example.aspx.resx file was created automatically and the another is a copy, but in the solution I have: example.aspx, example2.aspx, example3.aspx... How do I add more resources files automatically?
example.aspx.resx文件是自动创建的,另一个是副本,但是在解决方案中我有:example.aspx,example2.aspx,example3.aspx ...如何自动添加更多资源文件?
我已经找到了解决方案,仅是在设计模式下,然后单击菜单工具->生成本地资源。
What do you mean by "automatically"? “自动”是什么意思? It seems that you could use this MSDN article.
看来您可以使用此 MSDN文章。 Code excerpt taken from this article:
本文摘录的代码摘录:
using (ResXResourceWriter resx = new ResXResourceWriter(@".\CarResources.resx"))
{
resx.AddResource("Title", "Classic American Cars");
resx.AddResource("HeaderString1", "Make");
resx.AddResource("HeaderString2", "Model");
resx.AddResource("HeaderString3", "Year");
resx.AddResource("HeaderString4", "Doors");
resx.AddResource("HeaderString5", "Cylinders");
resx.AddResource("Information", SystemIcons.Information);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.