ITPub博客

首页 > 应用开发 > IT综合 > SAP Fiori internationalization(国际化)实现的一些例子

SAP Fiori internationalization(国际化)实现的一些例子

原创 IT综合 作者:i042416 时间:2020-03-03 08:33:27 0 删除 编辑

下图这个Opportunity的金额,在右边的明细页面里显示的是1880 USD,但为何在左边,显示的是2K这个近似值?


在Chrome开发者工具的调试器里,我们能看到从后台返回的金额确实是1880:

所以这个2k一定是前台UI5代码里进行的格式化:

答案就在上图sap.ca.ui.model.format.AmoutFormat.FormatAmoutShort这个方法里。

这里涉及到一个CLDR的概念:

CLDR - Unicode Common Locale Data Repository

The Unicode CLDR provides key building blocks for software to  support the world's languages, with the largest and most extensive standard repository of locale data available. This data is used by a wide spectrum of companies for their  software internationalization and localization, adapting software to the conventions of different languages for such common software tasks.


1880转换成2k的调试:



来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24475491/viewspace-2678164/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
测试

注册时间:2018-01-20

  • 博文量
    3822
  • 访问量
    1985557