-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
i18n Number Formatting Inconsistency #5876
Comments
As of right now number formatting uses the browser locale to perform the number internationalization vs. the passed in configuration from the renderer for translations, so this currently works as designed. I understand that your case requires them to be linked, but that is just not how it currently works. If there is a way to "force" the browser internationalization then I would just do that before the form is rendered and it should then show the numbers correctly. |
Thanks for the reply Travis. Please note that in the example, Regardless of my use case, IMO, number formatting should be consistent - ALWAYS use browser's locale if that is the design approach, but NEVER use a mix of browser locale and options language code. That is, number input should use the same number format as number formatting ( Also, I do have a workaround but it is just that - a workaround - and doesn't solve the root problem. Thanks. |
For Internal Reference: FIO-9353 |
After review, we don't expect to resource a developer to investigate this in the near future but would be happy to review any contributions to resolve this behavior. |
Describe the bug
When a language is specified in the Options JSON, that language's locale seems to be used to format numbers in the number input control or in the currency input control but the
utils.formatAsCurrency
function doesn't follow the same behavior. Perhapsutils.formatAsCurrency
is using the browser's locale? My testing was from the US.For the currency input control the input number seems to be formatted based on the language locale even though I specify currency is USD.
Version/Branch
5.0.0-rc.91
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The expectation is that the number input fields, currency input fields, and the
utils.formatAsCurrency
function would all format numbers the same. Maybe this isn't a reasonable expectation???Ideally, there would be a way to specify number and currency formatting locale separate from the language used for text display. I'm sure my situation is not unique. All currency on my website will be in USD (and should be entered and formatted as such) but I want to be able to display text in the user's preferred language.
BTW, I think Formio.js is an AWESOME product and hands-down the best Open Source form builder/runner out there. Thanks for this great product.
The text was updated successfully, but these errors were encountered: