SAP UI5 DatePicker控件和语言设置相关的属性详解
In SAP help, the determination of language code / locale is explained.
For example, when I access CRM application “My Appointment” with English language specified in url:
Https://:/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=001&sap-language=EN#Appointment-myAppointments&/newappointment/20151014/ZXXX/true
The DatePicker looks like below:
When I try with Chinese:
Https://:/sap/bc/ui5_ui5/ui2/ushell/shells/abap/FioriLaunchpad.html?sap-client=001&sap-language=ZH#Appointment-myAppointments&/newappointment/20151014/ZXXX/true
What I woud like to know is how is “2015年10月15日” displayed.
Based on previous research on DatePicker, this task should be a little bit easier:
– DateFormat in DatePicker control
– More details of DatePicker
(1) The place holders for Date display ( 年 – year, 月 – month, 日 – day ) for Chinese are stored in this.aFormatArray in DateFormat.js file.
(2) this.aFormatArray is determined by this.oFormatOptions.pattern. For language = ZH, the patter is “y年M月d日”.
(3) In Chrome network tab, we can observe a http request for file zh_CN.son.
The callstack which triggers this file request:
If we inspect the content of this file, we can find the “y年M月d日” in attribute dateFormat-medium and dateFormat-long:
The content of this file is parsed and merged into this.mData, which will be used to populate aFormatArray mentioned above.
The complete url for zh_CN.json:
https://:/sap/bc/ui5_ui5/ui2/ushell/resources/sap/ui/core/cldr/zh_CN.json
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- SAP UI5 sap.ui.core.Element 的概要介绍
- SAP UI5 应用中 MockServer 的实例化方法
- 批量打印 SAP CRM 系统所有包含 Error Message Log 的 订单
- SAP Spartacus UI 通过 HTTP Interceptor 给请求添加 Authorization 字段的源代码分析
- Angular HTTPClient API 在 SAP 电商云中的使用
- SAP QM Quality Certificate系列2
- SAP UI5 本地开发如何实现 XML 和 JavaScript 代码的自动完成和嵌入式 API 文档自动显示试读版
- Oracle购买SAP: 开启新数据时代(oracle收购sap)
- SAP 中的用户类型详解编程语言
- 访问SAP统一RFC连接接口(RESTFUL风格)详解编程语言
- SAP 采购订单PO基于采购金额的审批策略配置详解编程语言
- SAP自定义权限对象详解编程语言
- SAP 《MM学习指南》操作记录—- 计划协议及交货计划详解编程语言
- SAP笔记-LSMW 导入工具 录屏问题详解编程语言
- SAP query传输以后需要重新生成程序详解编程语言
- SAP vs Oracle:差异点与解析(sap和oracle的区别)
- Oracle与SAP在仓储领域的联姻(仓库oracle和sap)
- 深度比较:SAP vs Oracle(sap与oracle比较)
- 对比:Oracle 与 SAP的优势(oracle 与 sap)
- 调用SAP接口:MSSQL实现自动化(mssql调用sap接口)
- 使用Oracle与SAP进行数据接口开发(oracle sap接口)
- 探索 Oracle 与 SAP 技术的开发可能性(oracle sap开发)