显式本地化:asp.net 全局资源 (resx) 语言文件有(推荐)大小限制吗?
这是我第一次本地化或全球化任何东西,所以我正在即时学习。我正在使用 Visual Studio 2010 / net4.0 / vb。
将我的页面移动到位于我的 App_GlobalResources 目录中的 4 种语言 .resx 文件中。我有 LocalizedText.resx、fr.、.de 和 .es-mx。
我快要完成了。但我的 .resx 文件大小约为 120 KB。我不想增加加载时间,尤其是在速度慢或旧的计算机上。这太多了吗?这不是(推荐)吗?我想这个大小必须去某个地方,无论是在 aspx 文件中还是在 resx 文件中。
我只是想确保我一直在做正确的事情。
This is my first time localizing or globalizing anything, so I'm learning on the fly. I'm using Visual Studio 2010 / net4.0 / vb.
As a result of moving my pages into 4 language .resx files located in my App_GlobalResources directory. I have LocalizedText.resx, fr., .de, and .es-mx.
I'm just about done with it. But my .resx files are about 120 KB in size. I don't want to increase loading time, especially on slow or old computers. Is this too much? Is this not (recommended)? I suppose the size has to go somewhere, whether it's in the aspx file or resx file.
I just want to make sure I've been doing the right thing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 ASP.NET 站点上,性能不会受到客户端计算机性能的严重影响。 .resx 文件将在发送到客户端之前在服务器上被解析并编译为 HTML。无论资源文件中有多少条记录,生成的页面都将具有相同的大小,因此客户端不会受到影响。
话虽如此,120KB 并不算太大。根据服务器的大小,您可以使用更大的资源文件,但您的性能会有所不同。
On an ASP.NET site, the performance will not be so heavily impacted based on the client machine performance. The .resx file will be parsed and compiled into HTML on the server before being sent down to the client. The resultant page will be the same size, regardless of how many records you have in the resource file, so the client will not be affected.
That being said, 120KB is not excessive. Depending on the size of the sever, you can get away with much larger resource files, but your performance will vary.
.resx 文件的大小不会影响发送到客户端的页面大小。
页面使用的所有字符串都将包含在 HTML 中,但如果不需要资源,则不会发送该资源。
我曾经开发过本地化应用程序,其中包含数十个 resx 文件,总计数兆字节的数据,因此 120k 不会成为问题。
The size of the .resx file does not affect the size of the page sent to the client.
All of the strings used by the page will be included in the HTML, but if a resource isn't needed it won't be sent.
I have worked on localized applications that included dozens of resx files, totalling megabytes of data, so 120k is not going to be a problem.