Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

国际化里,怎么处理金额的转换? #9

Open
freewind opened this issue Mar 16, 2013 · 1 comment
Open

国际化里,怎么处理金额的转换? #9

freewind opened this issue Mar 16, 2013 · 1 comment

Comments

@freewind
Copy link

Date: 11 March 2013
Amount: $20000.00

或者

日期:2013年3月11日
金额:¥20000.00

如果仅替换金额符号,可能会产生问题,比如同样的东西,在美国卖1000美元,在中国就成了1000人民币。

是否应该提供一些方法,让金额在转换时有机会对数值也进行改变?

@greenlaw110
Copy link
Collaborator

嗯,这个总觉得是属于业务逻辑的范畴,要让模版自动转换有点难以实现,起码在哪里找汇率就是很麻烦。而且需要知道当前的基本货币是什么,又是一个配置。

如果提供API来做的话应该怎么设计这个API?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants