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的原创文章,请关注公众号"汪子熙":

  • 相关阅读:
    get请求中文乱码问题
    JDBC
    SpringSecurity
    IDEA中创建项目
    Vue路由传参的几种方式
    vue-cli搭建与使用
    docker发布springboot项目
    css伪类的使用
    java实体类序列化与反序列化
    docker网络
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/12349275.html
Copyright © 2011-2022 走看看