• <small id='PTtTV'></small><noframes id='PTtTV'>

    <tfoot id='PTtTV'></tfoot>

  • <i id='PTtTV'><tr id='PTtTV'><dt id='PTtTV'><q id='PTtTV'><span id='PTtTV'><b id='PTtTV'><form id='PTtTV'><ins id='PTtTV'></ins><ul id='PTtTV'></ul><sub id='PTtTV'></sub></form><legend id='PTtTV'></legend><bdo id='PTtTV'><pre id='PTtTV'><center id='PTtTV'></center></pre></bdo></b><th id='PTtTV'></th></span></q></dt></tr></i><div id='PTtTV'><tfoot id='PTtTV'></tfoot><dl id='PTtTV'><fieldset id='PTtTV'></fieldset></dl></div>
    <legend id='PTtTV'><style id='PTtTV'><dir id='PTtTV'><q id='PTtTV'></q></dir></style></legend>

          <bdo id='PTtTV'></bdo><ul id='PTtTV'></ul>
      1. 如何本地化数据库驱动的网站

        时间:2023-08-25

      2. <small id='Jswwd'></small><noframes id='Jswwd'>

        <legend id='Jswwd'><style id='Jswwd'><dir id='Jswwd'><q id='Jswwd'></q></dir></style></legend>
          <tbody id='Jswwd'></tbody>

        <i id='Jswwd'><tr id='Jswwd'><dt id='Jswwd'><q id='Jswwd'><span id='Jswwd'><b id='Jswwd'><form id='Jswwd'><ins id='Jswwd'></ins><ul id='Jswwd'></ul><sub id='Jswwd'></sub></form><legend id='Jswwd'></legend><bdo id='Jswwd'><pre id='Jswwd'><center id='Jswwd'></center></pre></bdo></b><th id='Jswwd'></th></span></q></dt></tr></i><div id='Jswwd'><tfoot id='Jswwd'></tfoot><dl id='Jswwd'><fieldset id='Jswwd'></fieldset></dl></div>
        • <tfoot id='Jswwd'></tfoot>

            <bdo id='Jswwd'></bdo><ul id='Jswwd'></ul>

                  本文介绍了如何本地化数据库驱动的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我一直在使用 .NET 内置的本地化功能,它们似乎都依赖于将数据放入 resx 文件中.

                  I've been playing with the .NET built in localization features and they seem to all rely on putting data in resx files.

                  但大多数系统不能依赖此,因为它们是数据库驱动的.那么你如何解决这个问题呢?是否有内置的 .NET 方式,或者您是否在 SQL 中创建翻译表并手动完成所有操作?如果您必须在大多数网站上执行此操作,是否有任何理由甚至使用 resx 本地化方式?

                  But most systems can't rely on this because they are database driven. So how do you solve this issue? Is there a built in .NET way, or do you create a translations table in SQL and do it all manually? And if you have to do this on the majority of your sites, is there any reason to even use the resx way of localization?

                  这方面的一个例子是我的网站上有一个常见问题解答列表,我将此列表保存在数据库中,以便我可以轻松添加/删除更多内容,但是将其放入数据库中,我无法翻译此信息翻译成多种语言.

                  An example of this is I have an FAQ list on my site, I keep this list in the database so I can easily add/remove more, but by putting it in the database, I have no good way have translating this information into multiple languages.

                  推荐答案

                  在我看来,本地化动态内容(例如,您的常见问题解答)应该由您在数据库中完成.根据您的问题的存储方式,我可能会创建一个区域设置"列并在从数据库中选择常见问题解答问题时使用它.我不确定当您开始本地化大量表时这是否会很好地扩展.

                  In my opinion, localizing dynamic content (e.g., your FAQ) should be done by you in your database. Depending on how your questions are stored, I would probably create a "locale" column and use that when selecting the FAQ questions from the database. I'm not sure if this would scale very well when you started localizing lots of tables.

                  对于静态内容(例如,表单字段标签、静态文本、图标等),您应该可以使用基于文件的资源.但是,如果您真的想这样做,看起来创建一个可以处理此问题的自定义资源提供程序实现并不难.

                  For static content (e.g, form field labels, static text, icons, etc) you should probably be just fine using file-based resources. If you really wanted to, however, it looks like it wouldn't be super hard to create a custom resource provider implementation that could handle this.

                  以下是一些相关链接:

                  • http://channel9.msdn.com/forums/Coffeehouse/250892-Localizing-with-a-database-or-resx-files/
                  • http://weblogs.asp.net/scottgu/archive/2006/05/30/ASP.NET-2.0-Localization-_2800_Video_2C00_-Whitepaper_2C00_-and-Database-Provider-Support_2900_.aspx
                  • http://www.arcencus.nl/Blogs/tabid/105/EntryID/20/Default.aspx
                  • http://msdn.microsoft.com/en-us/library/aa905797.aspx
                  • http://www.codeproject.com/KB/aspnet/customsqlserverprovider.aspx

                  这篇关于如何本地化数据库驱动的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:ASP.NET 中的全局资源与本地资源 下一篇:.resx vs 数据库 vs 提供本地化/全球化的自定义解决

                  相关文章

                  最新文章

                    <small id='9gZmB'></small><noframes id='9gZmB'>

                      <legend id='9gZmB'><style id='9gZmB'><dir id='9gZmB'><q id='9gZmB'></q></dir></style></legend>
                      <tfoot id='9gZmB'></tfoot>
                        <bdo id='9gZmB'></bdo><ul id='9gZmB'></ul>
                    1. <i id='9gZmB'><tr id='9gZmB'><dt id='9gZmB'><q id='9gZmB'><span id='9gZmB'><b id='9gZmB'><form id='9gZmB'><ins id='9gZmB'></ins><ul id='9gZmB'></ul><sub id='9gZmB'></sub></form><legend id='9gZmB'></legend><bdo id='9gZmB'><pre id='9gZmB'><center id='9gZmB'></center></pre></bdo></b><th id='9gZmB'></th></span></q></dt></tr></i><div id='9gZmB'><tfoot id='9gZmB'></tfoot><dl id='9gZmB'><fieldset id='9gZmB'></fieldset></dl></div>