标签:ali action menus mem his hat lis enc seo
https://www.cnblogs.com/foreachlife/p/5067380.html
使用了XAF开发时,汉化是一个比较常的问题。
要实现汉化很简单:
1.在这里下载汉化资源文件。这里演示的版本是15.1.X的
2.文件下载后将:文件解压到目录 <你的项目>\BIN\ 下面。 解压后如下所示:
这一步的功能是:汉化多数控件中的使用的文字资源。这是官方提供的方法,也有些字符串是没有被汉化的。因为DEV支持的语言也不少,也制做了许多国家的语言包。但CN的资源包还没有做完全汉化。
注意:上例中是在web中,在Win中,同样需要将上面的文件解压过去。
3.XAF中内容的汉化,因为XAF是基于控件开发的,所以控件汉化也算是完成了一部分XAF的汉化。另外不在控件中的,就需要在XAFML中进行汉化了。
In this topic, you will learn how to localize a typical XAF application. We recommend that you review the Application Model Basics andLocalization Basics topics before proceeding. You can localize an XAF application in two ways.
These two approaches are described below. We recommend using the Localization Tool, because it makes the localization process quicker and more convenient.
These are the initial steps that should be performed independent of the chosen localization approach.
Template resources include strings such as "File", "View", "Home" and "Tools", used in the application‘s main menus as well as the ribbon. If you see that the menu items in the standard form, or page and group captions in the ribbon form, are not translated, ensure that you have added and translated the template resources.
We recommend that you begin the translation from the platform-agnostic module, and then proceed to the platform-specific modules. Follow the steps below to localize each of your XAF application modules with the Localization Tool.
Click the Localization button in the XAF Model Editor Toolbar. The expressApp Framework Localization window will be invoked.
This window provides the grid editor with all localizable property names, paths, descriptions and values. The toolbar with the set of commands is also provided. The grid columns and actions available in this window are described in the Localization Tool topic.
In the Localization window toolbar, select the target language via the Translation Language drop-down.
If you have successfully installed satellite assemblies for the target language, you will see that text supplied with the standard XAF modules have already been translated.
Apply the Untranslated non-calculated filter via the Filters action.
This filter selects the properties that have non-empty default language values with Is Translated unchecked and Is Calculatedchecked. For instance, the OwnMembers node’s Caption properties will be displayed and the Columns node’s Caption properties will be hidden.
Translate all the values in the Translated Value column. Pressing the ENTER key moves focus to the next row. If there are several properties with the same Default Language value, the Multiple Values Translation dialog will be invoked. Click Yes, and all these values will be translated at once, and the next value to be translated will be focused.
You can use the Translate... button to automate the translation. Select one, several or all rows, and click Translate... or press CTRL+T. In the invoked dialog, select the original language (English by default), click Translate and the Microsoft Translator service will translate for you. Of course, an Internet connection is required for this feature. Note that automatic translation is not perfect, and requires review.
If you are not fluent in the target language, you can hire a professional translator. Export the selected rows to a CSV file via the Export |Selected records command, and pass this file to the translator. The translator will edit the values in the Translated Value column using a spreadsheet or a plaintext editor of his/her choice. The Description column content will help him/her see the context. The translated values can be loaded back from the CSV file via the Import Action. If non-latin characters are used in the CSV file, the file encoding should be UTF-8.
When you have finished the translation, click Save or press CTRL+S to save changes to the Application Model. The translated properties will be hidden due to the Untranslated... filter, and the Is Translated checkbox is checked after saving.
Next, apply the Calculated filter to review the calculated values.
A typical XAF application has platform-specific versions of the authentication, security strategy and modules. For instance, Windows Forms and ASP.NET applications can have SchedulerWindowsFormsModule and SchedulerAspNetModule modules included respectively. These modules extend the Application Model with localizable properties that are not available at the module level. You can have platform-specific Controllers provide strings that need to be localized (action captions, tooltips, exceptions, etc.). So, you should repeat these steps for each platform-specific module.
Localizing an XAF application directly in the Model Editor is an alternate approach.
If you do not use the Active Directory authentication, take special note of the Log On window (web page) UI elements‘ localization. The Log On andCancel buttons are Actions. These Actions have Logon and DialogCancel IDs, and are localizable under the ActionDesign | Actions node.
This step should be performed separately for Windows Forms and ASP.NET applications. Use the Model Editor invoked for each application project to localize the Log On window (web page) UI elements. However, the "Log On" and "Cancel" Actions captions can be localized in the module project Model. See the step 5 note for details. The message displayed when the logon fails is also localized in the module project Model under theLocalization | Exceptions | UserVisibleExceptions | Security node.
|
|||
static void Main() {
// ...
MySolutionWindowsFormsApplication winApplication =
new MySolutionWindowsFormsApplication();
// ...
try {
winApplication.SplashScreen.SetDisplayText("Custom Text");
winApplication.Setup();
winApplication.Start();
// ...
|
标签:ali action menus mem his hat lis enc seo
原文地址:https://www.cnblogs.com/xyyhcn/p/11719552.html