• <bdo id='9hRLA'></bdo><ul id='9hRLA'></ul>
      <tfoot id='9hRLA'></tfoot>

    1. <small id='9hRLA'></small><noframes id='9hRLA'>

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

        制作多语言网站的最佳方式

        时间:2023-08-26

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

          1. <tfoot id='Ium9c'></tfoot>

              <legend id='Ium9c'><style id='Ium9c'><dir id='Ium9c'><q id='Ium9c'></q></dir></style></legend>

                    <tbody id='Ium9c'></tbody>

                  <small id='Ium9c'></small><noframes id='Ium9c'>

                  本文介绍了制作多语言网站的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我使用(Asp.net, c#) 制作了一个网站,其内容为English.现在我需要以支持多种语言的方式制作这个网站,即(德语,法语).Lable/Textbox/string 所有值将显示各自选择的语言在搜索时我开始知道有一些方法像

                  I have made a website using(Asp.net, c#) and its content in English. Now i have a requirement to make this website in such a way that is support multiple languages ie (German,French). Lable/Textbox/ string all values will display respective selected languages While searching i came to know there are some ways like

                  • 使用本地化
                  • 使用资源文件.
                  • 数据库(每样东西都保存在不同语言的数据库中).

                  坦率地说,我不同意第三种选择.

                  frankly speaking I am not agree with 3rd option.

                  我想知道哪种方式最好还是有其他更好的方式?

                  I want to know which is the best way to go or is there any other better way?

                  注意:当前网站是使用 .NET framework 4.0/vs 2010 构建的.

                  Note:Current Website was built using .NET framework 4.0/ vs 2010.

                  谢谢

                  推荐答案

                  我使用资源文件添加 global.asax 完成的示例代码

                  Sample code i have done using resource file add global.asax

                   void Application_BeginRequest(Object sender, EventArgs e)
                          {
                              // Code that runs on application startup
                              HttpCookie cookie = HttpContext.Current.Request.Cookies["CultureInfo"];
                              if (cookie != null && cookie.Value != null)
                              {
                                  System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(cookie.Value);
                                  System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(cookie.Value);
                              }
                              else
                              {
                                  System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en");
                                  System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en");
                              }
                          }
                  

                  这篇关于制作多语言网站的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:为什么这会出现在我的 c# 字符串中: 下一篇:如何在 web.sitemap 中实现本地化

                  相关文章

                  最新文章

                    <legend id='4bBNR'><style id='4bBNR'><dir id='4bBNR'><q id='4bBNR'></q></dir></style></legend>
                    1. <tfoot id='4bBNR'></tfoot>
                        <bdo id='4bBNR'></bdo><ul id='4bBNR'></ul>

                      <small id='4bBNR'></small><noframes id='4bBNR'>

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