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

Does not have i18n for formatting ? #39

Closed
ghost opened this issue Jan 15, 2019 · 4 comments
Closed

Does not have i18n for formatting ? #39

ghost opened this issue Jan 15, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 15, 2019

Am building a templating system and need to handle currency properly.
Does this library have functionality for this ?
E.g in Sweden and Germany money is displayed differently

If you know of I lib I can combine and PR if you want too

@Rhymond
Copy link
Owner

Rhymond commented Jan 15, 2019

Hi @gedw99,

Could you give me an example?
At the moment you can create new currency using money.AddCurrency()
(https://github.com/Rhymond/go-money/blob/master/currency.go#L152)

You can create new currency for each language (or languages which requires different display.

@ghost
Copy link
Author

ghost commented Jan 15, 2019

hey @Rhymond
then it might work from what your said.
I need to to take unit of money and display it correctly according to the users locale.

Can you point me to the relevant code as i cant find it.

@Rhymond
Copy link
Owner

Rhymond commented Jan 16, 2019

Have you tried?
https://github.com/Rhymond/go-money/blob/master/currency.go#L152
This function?

@Rhymond
Copy link
Owner

Rhymond commented Jan 21, 2019

@gedw99 did you manage to solve your issue?

@Rhymond Rhymond closed this as completed Mar 13, 2019
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

1 participant