简体   繁体   English

百分比格式的国际化

[英]Internationalization on percentage formatting

How do we do number formatting for location of percentage sign (%) in angular?我们如何对百分比符号 (%) 的位置进行数字格式化? For currency, angular has i18n that supports internationalization based on the currency symbol.对于货币,angular 有 i18n 支持基于货币符号的国际化。 How about %?怎么样 %? For example, in Turkish, % is put on left side (before the number) instead of on the right side.例如,在土耳其语中,% 放在左侧(数字之前)而不是右侧。

Is there a framework from angular to do this?有角度的框架可以做到这一点吗?

I found the answer for my question.我找到了我的问题的答案。 Javascript has a built in function for this. Javascript 有一个内置的功能。 I ended up using their functionality and it works perfectly fine https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl .我最终使用了他们的功能,它运行得非常好https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Intl

Hope this helps others.希望这对其他人有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM