Skip to content

Price not respect set locale #433

@schrek1

Description

@schrek1

I set explicitly locale in the constructor
Faker f = new Faker(Locale.ENGLISH);
but if I call f.commerce().price() it returns number in computer locale format.

I think it is becouse in price is called new DecimalFormat("#0.00").format(price); and inside it is called Locale.getDefault instead should use preset locale in faker constructor e.g. DecimalFormat("#0.00", new DecimalFormatSymbols(userLocale))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions