前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SAP UI5 DatePicker控件和语言设置相关的属性详解

SAP UI5 DatePicker控件和语言设置相关的属性详解

作者头像
Jerry Wang
发布2020-08-10 10:54:28
6220
发布2020-08-10 10:54:28
举报

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 controlMore 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

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-08-09 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档