-
Notifications
You must be signed in to change notification settings - Fork 170
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
Add configuration for locale in Numbro #504
Comments
I'm afraid that Numbro locale aware formatting is only the peak of the iceberg. We should at least inspect Turnilo code for other places where localisation is important (e.g. date formatting). If not the UI experience will not be logical and consistent. The second question is how to configure locale? I'm not sure that static (and global) configuration for Turnilo instance is the best what we can do. Perhaps Turnilo could set locale based on browser preferences (http headers) but user should be able to change the locale from UI (exactly like timezone) and finally we need a fallback to locale set in Turnilo configuration file. Let's discuss the Turnilo localisation before we start coding :) At least prepare the plan with milestones. |
Nope, don't do this. Let user pick locale. Default is provided by configuration. Just like timezone.
Numbers and dates are low hanging fruits and we should focus on them. But some research wouldn't do any harm :) |
Agree
Yep, search for dates and numbers "formatted" manually without libraries. |
Guys I am pretty impressed how fast requests for enhancements are driven forward. Thanks a lot. Unfortunately I am not a developer so I cannot help with the heavy lifting. |
Hello. :) What we are after is the ability to define multiple custom csv and tsv exports - with our own formatting, which would be defined in the config. Right now (refrence - #533), I'm using moment.format() for dates and .toLocaleString() for numbers. This is a bit inconsistent, so I'd like to discuss if we should stick to moment & toLocaleString combo or maybe switch to something like Intl and localeString or numbro and moment. In my PR, exports defined within the config have this structure:
If nothing is defined in
These are designed to resemble current default "Export to TSV" and "Export to CSV" formatting as closely as possible. |
In order to have numbers and currencies formated according to local standards it would be very helpful to have a configuration option in Turnilo for this matter. E.g., setting it to "de-DE" makes Turnilo use "€" as currency symbol, "," as decimal separator and "." as thousandts separator.
The text was updated successfully, but these errors were encountered: