In this lesson, you will learn the basics of localizing visible UI elements. By default, the application uses the invariant language (English). You will translate your application into German, and create a multi-language application. To illustrate different localization scenarios, the lesson is divided into two sections. They should be performed in order. You will translate several captions for training purposes. To learn how to fully localize an XAF application, first review the Localization section, then follow the How to: Localize an XAF Application topic.

在本课中,您将学习本地化可见 UI 元素的基础知识。默认情况下,应用程序使用固定语言(英语)。您将将应用程序翻译成德语,并创建多语言应用程序。为了说明不同的本地化方案,本课程分为两个部分。它们应按顺序执行。您将翻译几个标题以用于培训目的。要了解如何完全本地化 XAF 应用程序,请先查看本地化部分,然后按照"如何:本地化 XAF 应用程序"主题进行操作。

Note 注意
Before proceeding, take a moment to review the Place an Action in a Different Location lesson.
在继续之前,请花点时间复习"将操作置于不同位置"课程。

Translate Your Application into an Additional Language

将应用程序转换为其他语言

Follow the steps below to study the basic concepts of translating your application.

  • Invoke the Model Editor for the MySolution.Module project. Find the Model Editor's toolbar. If it is hidden, check the View | Toolbars | XAF Model Editor menu item. In the toolbar's Language combo box (located on the Model Editor's toolbar), select de. If it is not there, click the Language Manager... item. In the invoked dialog, click the Add button and select de (German - Deutsch).

请按照以下步骤学习翻译应用程序的基本概念。

  • 调用 MySolution.模块项目的模型编辑器。查找模型编辑器的工具栏。如果隐藏,请检查视图 |工具栏 |XAF 模型编辑器菜单项。在工具栏的语言组合框中(位于模型编辑器的工具栏上),选择 de。如果不存在,请单击语言管理器...项目。在调用的对话框中,单击"添加"按钮并选择 de(德语 - 德语)。

  • After adding the language, you should restart Visual Studio.
  • Select the newly added language in the Language combo box.

  • 添加语言后,应重新启动 Visual Studio。

  • 在"语言组合"框中选择新添加的语言。

  • To fully localize your application, you should look through all the nodes and their child nodes to set German values for the properties denoted by the "globe" glyph. The Localization Tool simplifies this task. For training purposes, translate a few values to see how this affects your application. Esentially, the Caption properties can be localized.

  • 要完全本地化应用程序,应查看所有节点及其子节点,以设置由"globe" 字形表示的属性的德语值。本地化工具简化了此任务。出于培训目的,请转换几个值,以查看这对应用程序有何影响。从经验上讲,标题属性可以本地化。

Note 注意
The How to: Localize an XAF Application topic explains how to localize an XAF application.
"如何:本地化 XAF 应用程序"主题说明如何本地化 XAF 应用程序。
  • In the Model Editor invoked for a WinForms project and/or an ASP.NET application project, navigate to the Application node. In the PreferredLanguage property's dropdown list, select "de". If you need to use the German language in both the WinForms and ASP.NET applications, you can specify the PreferredLanguage property value in the Model Editor invoked for the application module.
  • 在为 WinForms 项目和/或ASP.NET应用程序项目调用的模型编辑器中,导航到应用程序节点。在"首选语言"属性的下拉列表中,选择"de"。。如果需要在 WinForms 和ASP.NET应用程序中使用德语,则可以在为应用程序模块调用的模型编辑器中指定首选语言属性值。

  • Run the WinForms or ASP.NET application. Check to see that the properties that you translated via the Model Editor are displayed in German.
  • 运行 WinForms 或ASP.NET应用程序。检查您通过模型编辑器翻译的属性是否以德语显示。

Make a User-Language Application

创建用户语言应用程序

Perform the steps below if your application needs to be in the user's language (the user's operating system language or the language passed by the user's Internet browser).

如果应用程序需要使用用户的语言(用户的操作系统语言或用户的 Internet 浏览器传递的语言),请执行以下步骤。

  • Translate your application into the required languages. For this purpose, invoke the Model Editor, set the required language in the Model Editor's Language toolbar item and translate all localizable property values (as detailed in the previous section). Do this for each required language.
  • In the Model Editor invoked for the WinForms and/or ASP.NET application project, navigate to the Application node. In the PreferredLanguage property's dropdown list, select the (User language) item.
  • Alternatively, you can specify the PreferredLanguage property value in the Model Editor invoked for the application module. In this instance, the user language will be used in both the WinForms and ASP.NET applications.
  • 将应用程序翻译成所需的语言。为此,调用模型编辑器,在模型编辑器的语言工具栏项中设置所需的语言,并翻译所有可本地化的属性值(如上一节所述)。对每种必需的语言执行此操作。
  • 在为 WinForms 和/或 ASP.NET应用程序项目调用的模型编辑器中,导航到应用程序节点。在"首选语言"属性的下拉列表中,选择(用户语言)项。
  • 或者,您可以在为应用程序模块调用的模型编辑器中指定"首选语言"属性值。在这种情况下,用户语言将在 WinForms 和ASP.NET应用程序中使用。

  • Run the WinForms or ASP.NET application. Check to see if the language corresponds to your system's current language.

    If you did not localize the application to your system's current language, the default language (English) will be used.

  • 运行 WinForms 或ASP.NET应用程序。检查该语言是否与系统的当前语言相对应。
    如果未将应用程序本地化为系统的当前语言,将使用默认语言(英语)。

You can see a sample application localized into German in the Main Demo. The MainDemo application is installed in %PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/

您可以在主演示中看到本地化为德语的示例应用程序。主演示应用程序安装在%PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/

.

Localize UI Elements 汉化界面(本地化)的更多相关文章

  1. jquery UI datepicker汉化

    由于近期工作需要,jquery ui的datepicker需要汉化,特此把代码贴在这$(function() { $.datepicker.regional["zh-CN"] = ...

  2. kendo ui grid 汉化

    加入js引用 <link href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.common.min.css" r ...

  3. 【汉化】Acunetix Web Vulnerability Scanner 11.x汉化包

    破解补丁::http://www.52pojie.cn/thread-609275-1-1.html 汉化界面截图: 登陆界面 仪表盘 目标   漏洞 扫描 用户配置 汉化详情: 1.对UI界面大部分 ...

  4. pfSense用户界面汉化翻译教程

    pfSense用户界面汉化翻译教程 来源 https://blog.51cto.com/fxn2025/2087182 为了记录自己的汉化过程,同时也为了方便网友自己制作汉化版本,我把自己汉化pfSe ...

  5. PowerDesigner V16.5 安装教程以及汉化(数据库建模)

    一.power designer是什么以及是干什么的? power designer是能进行数据库设计的强大的软件,是一款开发人员常用的数据库建模工具.分别从概念数据模型(Conceptual Dat ...

  6. PowerDesigner V16.5 安装及汉化

    一.power designer是什么以及是干什么的? power designer是能进行数据库设计的强大的软件,是一款开发人员常用的数据库建模工具.分别从概念数据模型(Conceptual Dat ...

  7. Docker 一键安装及Docker管理面板Portainer中文汉化

       前言 Docker接触了一段时间了,批量操作过程中感觉太繁琐,所以找到了好评率比较高的Portainer面板,使用后感觉的确不错所以准备拿出来精力来做个汉化版,过程中发现词条非常多,所以暂时先汉 ...

  8. MobSF移动安全扫描平台本地化部署与简单汉化

    在之前的文章MobSF移动安全扫描平台环境搭建与试用中,我们用docker进行了搭建,那么我们如何在本地直接搭建呢,其实也是很简单的. 本地化部署 我们在本地安装 其实是很简单的,里面有两个文件,在不 ...

  9. 【krpano】汉化Web VR设置界面

    欢迎加入qq群551278936讨论krpano解密技术以及获取最新软件 krpano 1.19支持了Web VR功能,允许以VR的方式查看全景图,配合上VR设备可以实现VR效果. 在VR方式查看时, ...

随机推荐

  1. 自古逢秋悲寂寥,奈何今秋热成雕?Python使用Pyecharts统计全国温度Top10并绘图

    秋词-刘禹锡 自古逢秋悲寂寥, 我言秋日胜春朝. 晴空一鹤排云上, 便引诗情到碧霄. 古人谈及秋天,都是悲凉寂寥,那么-.我好想回到古代的秋天啊!明明到了秋天,为什么最近的气温比夏天还热. 之前做天气 ...

  2. Python批量检测服务器端口可用性与Socket函数使用

    socket函数 简述 socket又称套间字或者插口,是网络通信中必不可少的工具.有道是:"无socket,不网络".由于socket最早在BSD Unix上使用,而Unix/L ...

  3. 【nodejs原理&源码赏析(7)】【译】Node.js中的事件循环,定时器和process.nextTick

    目录 Event Loop 是什么? Event Loop 基本解释 事件循环阶段概览 事件循环细节 timers pending callbacks poll阶段 check close callb ...

  4. C#DateTime格式转换全介绍

    DateTime与字符串转换: DateTime()与转换为字符串主要依靠DateTime().ToString(string format) 函数,以我的理解,参数format大体分为单个字母和多个 ...

  5. 【Java库】如何使用优秀的加密库Jasypt来保护你的敏感信息?

    1 简介 今天我们介绍一个Java库-Jasypt,全称为Java Simplified Encryption,用于加密解密.它能够让开发者用花费最小的工作而把加密集成到项目中,并且不需要对加密/解密 ...

  6. 洛谷 题解 P5535 【【XR-3】小道消息】

    我又双叒叕被包菜辣! P5535 [XR-3]小道消息(这道题是个大水题 在题干中这位良心的作者就提醒了我们: 你可能需要用到的定理--伯特兰-切比雪夫定理. 那么什么是伯特兰-切比雪夫定理? 我也不 ...

  7. android 点击无效验证

    背景 在写一个东西滑动删除列表的时候,出现了一个问题.我的需求是,左滑然后出现delete,然后点击delete,让该滑块消失. 我在点列表的第一行的时候,左滑,出现delete,点击删除,ok的,完 ...

  8. iOS apns推送

    前言:推送分为本地推送以及远程推送. 两者的区别为本地推送一般为定时推送.定期推送或者位置推送.而远程推送更为多样化,能满足较高的要求.当然远程推送需要服务器端开发,开发流程较复杂. 1.本地推送只需 ...

  9. BZOJ 3112 [Zjoi2013]防守战线

    题解:单纯形:转化为对偶问题: 对于最大化 cx,满足约束 Ax<=b ,x>0 对偶问题为 最小化 bx,满足约束 ATx>=c ,x>0 (AT为A的转置) 这一题的内存真 ...

  10. 【算法】331- JS洗牌算法

    点击上方"前端自习课"关注,学习起来~ 最近的一个塔罗牌项目中,有一个洗牌的需求,其实也就是随机打乱数组,遂网上搜了下,再此做个整理- 塔罗牌 举例来说,我们有一个如下图所示的数组 ...