zoukankan      html  css  js  c++  java
  • SAP Fiori internationalization(国际化)实现的一些例子

    下图这个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的调试:












    要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  • 相关阅读:
    什么是封装?
    table
    POM文件
    Maven环境的搭建
    什么是maven
    J2EE的三层经典结构
    DOM对象和jQuery对象对比
    jQuery常用选择器分类
    什么是JQuery?它的特点是什么?
    jQuery准备函数语法
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/12349275.html
Copyright © 2011-2022 走看看