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

x/text/currency: position of the ISO code or sign in amounts #14308

Open
arvenil opened this issue Feb 12, 2016 · 3 comments
Open

x/text/currency: position of the ISO code or sign in amounts #14308

arvenil opened this issue Feb 12, 2016 · 3 comments
Milestone

Comments

@arvenil
Copy link

@arvenil arvenil commented Feb 12, 2016

    currencyCode = "PLN"
    unit, _ := currency.ParseISO(currencyCode)
    p := message.NewPrinter(language.Polish)
    amount := float64(100)
    p.Print(currency.Symbol(unit.Amount(amount)))

The result is zł 100 but I would expect 100 zł.
https://en.wikipedia.org/wiki/ISO_4217#Position_of_ISO_4217_code_in_amounts
http://publications.europa.eu/code/en/en-370303.htm#position

I would expect 100 zł but maybe there is "other" library/func/method that handles order?
Or if this is on TODO list, any idea how could I workaround the problem?

@arvenil

This comment has been minimized.

Copy link
Author

@arvenil arvenil commented Feb 12, 2016

@jarifibrahim

This comment has been minimized.

Copy link

@jarifibrahim jarifibrahim commented Dec 1, 2018

I would like to work on this but I'm not sure how to find the correct position for the currency symbol. Can someone help me out?

@arvenil

This comment has been minimized.

Copy link
Author

@arvenil arvenil commented Dec 10, 2018

@jarifibrahim Do you mean this?

  1. https://en.wikipedia.org/wiki/ISO_4217#Position_of_ISO_4217_code_in_amounts
  2. http://publications.europa.eu/code/en/en-370303.htm#position

Note that, as illustrated, the order is determined not by the currency, but by the native language of the document context.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.