File size localisation for advanced upload component

UI Components for JSF
Post Reply
Nantor
Posts: 1
Joined: 13 Feb 2019, 12:13
Location: Germany

13 Feb 2019, 13:07

Hallo,

I use Primefaces in our application with different languages and I noticed, that the file size has every time the same format in every language. So I looked deeper in your code and found this line 2-fileupload.js#L370, the same line of code is in the current master.
The size is printed out with the Number.prototype.toFixed() method. I think it would be better to use the Number.prototype.toLocaleString() instate.
Needed options can came from the Primeface settings (Docs: 11.5 PrimeFaces Locales), like in datepicker or schedule.
May this could also found usage in similar situations.
Have I spot some thing or is there a reason for using the Number.prototype.toFixed()?

Best regards
Sebastian
Primeface 6.2
Oracle Mojarra JSF 2.2

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests