Skip to content

x/text/currency: numbers not being formatted based on the language #47623

@alexedwards

Description

@alexedwards

What version of Go are you using (go version)?

go1.16.5 linux/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

package main

import (
	"golang.org/x/text/currency"
	"golang.org/x/text/language"
	"golang.org/x/text/message"
)

func main() {
	p := message.NewPrinter(language.German)
	p.Print(currency.EUR.Amount(123.56))
}

https://play.golang.org/p/EWlRXaoptzU

What did you expect to see?

EUR 123,56

With the German language decimal separator ,.

What did you see instead?

EUR 123.56

Note: Not using the currency package, but formatting the number manually yields the expected result - https://play.golang.org/p/W6SALPNJBg6

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions