• <tfoot id='ohcuv'></tfoot>
  • <legend id='ohcuv'><style id='ohcuv'><dir id='ohcuv'><q id='ohcuv'></q></dir></style></legend>

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

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

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

        英文桌面 C#.net 应用程序中的阿拉伯语本地化

        时间:2023-08-26
          <legend id='McWiC'><style id='McWiC'><dir id='McWiC'><q id='McWiC'></q></dir></style></legend>

          1. <small id='McWiC'></small><noframes id='McWiC'>

              <tbody id='McWiC'></tbody>

              <tfoot id='McWiC'></tfoot>
                <bdo id='McWiC'></bdo><ul id='McWiC'></ul>
                • <i id='McWiC'><tr id='McWiC'><dt id='McWiC'><q id='McWiC'><span id='McWiC'><b id='McWiC'><form id='McWiC'><ins id='McWiC'></ins><ul id='McWiC'></ul><sub id='McWiC'></sub></form><legend id='McWiC'></legend><bdo id='McWiC'><pre id='McWiC'><center id='McWiC'></center></pre></bdo></b><th id='McWiC'></th></span></q></dt></tr></i><div id='McWiC'><tfoot id='McWiC'></tfoot><dl id='McWiC'><fieldset id='McWiC'></fieldset></dl></div>
                  本文介绍了英文桌面 C#.net 应用程序中的阿拉伯语本地化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在构建一个企业 C#.net 应用程序,要求有阿拉伯语和英语版本.客户提供了 2 个选项,要么将英语和阿拉伯语一起写成标签和描述,要么放置一个组合框,开始选择英语和阿拉伯语并继续使用该语言.我想节省我的时间,并希望我可以构建一个英文版本,并且必须自动翻译阿拉伯语.

                  I am building an enterprise C#.net application, the requirement is there will be Arabic and English version both. 2 options are given from client, either to write English plus Arabic together for labels and descriptions or to place a combo box in start having English and Arabic to select and to proceed with that language. I want to save my time and want that i could just build an English version and Arabic must be auto translated.

                  提前致谢.

                  推荐答案

                  首先,你不需要选择任何东西,如果有人在他/她的操作系统中设置了阿拉伯语区域设置,它就已经被选中了.要检测使用的语言(如果您需要此信息,通常不需要),您只需阅读 System.Globalization.CultureInfo.CurrentUICulture 属性.

                  First of all, you do not need to select anything, it would be already selected if somebody set Arabic Locale in his/her Operating System. To detect what language is used (if you need this information, usually you don't) you would simply read System.Globalization.CultureInfo.CurrentUICulture property.

                  但是,在 WinForms 中,您实际上可以使用内置的本地化支持.为此,您需要将 Form Localizable 属性切换为 true.假设您提供了阿拉伯语字符串,您需要将 Form 的 Language 属性从(默认)切换到阿拉伯语 完成英语布局并将翻译放置在适当的位置.这是最简单的方法.在使用阿拉伯语时,您还需要将 Form 的 RightToLeft 属性切换为 Yes 并将 RightToLeftLayout 切换为 True.
                  如果您正确执行此操作,您会看到该表单已镜像.这是理想的情况,不要惊慌.

                  However, in WinForms you could actually use built-in Localization support. To do that, you need to switch Form Localizable property to true. Assuming that you have Arabic strings provided, you would need to switch Form's Language property from (default) to Arabic after you complete you English layout and place the translations in appropriate places. That is the easiest way. You would also need to switch Form's RightToLeft property to Yes and RightToLeftLayout to True while on Arabic.
                  If you do that properly, you would see that form is mirrored. That's desired situation, do not panic.

                  更糟糕的是,您有时需要显示消息框.这里的问题是,根据您使用的语言类型,您实际上需要以不同的方式进行操作,因为阿拉伯语(和其他 RTL 语言)需要使用 RTLReading 常量:

                  The worse part is that you would occasionally need to display Message Boxes. The problem here is, that depending on what language type you are using, you actually would need to do it in a different way, for Arabic (and other RTL languages) require that RTLReading constant be used:

                  if (CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft)
                  {
                      MessageBox.Show(text, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading);
                  }
                  else
                  {
                      MessageBox.Show(text, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);
                  }
                  

                  这就是高级别的......

                  That's it on the high level...

                  这篇关于英文桌面 C#.net 应用程序中的阿拉伯语本地化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何使 RightToLeftLayout 适用于 GroupBoxes 和 Panels 中 下一篇:本地化:如何将文化信息映射到脚本名称或 Unico

                  相关文章

                  最新文章

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

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

                    2. <legend id='RBNm3'><style id='RBNm3'><dir id='RBNm3'><q id='RBNm3'></q></dir></style></legend>
                        <bdo id='RBNm3'></bdo><ul id='RBNm3'></ul>