You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be nice to see a way to implement localization for number formats with regards to separators.
What problem would this solve?
Currently it is possible to use fmt=eur2 on a number 1234.56 to see it formatted as €1,234.56. But in Germany it should actually read 1.234,56 €. So the thousands separator is a dot and the separator for decimals is a comma. Also not that the currency symbol is at the end. In Switzerland, this number should read 1'234.56 € with an apostrophe as thousands separator and a dot for the decimals separator. I am not sure if this can be done with the current formatting options. At least, I did not succeed using the prop fmt='#.##0,00" €"' on a DataTable column.
It is possible to format the number through SQL DuckDB 1.1.0: D select format ('{:t.} €', 1234.56); and get the string 1.234,56 €. However, all number related props and charts will no longer work on this column.
How should it work?
Ideally, keep the format and specify locale. <MyNewComponent fmt='eur2' loc='de-DE' />
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Description
Would be nice to see a way to implement localization for number formats with regards to separators.
What problem would this solve?
Currently it is possible to use
fmt=eur2
on a number1234.56
to see it formatted as €1,234.56. But in Germany it should actually read1.234,56 €
. So the thousands separator is a dot and the separator for decimals is a comma. Also not that the currency symbol is at the end. In Switzerland, this number should read 1'234.56 € with an apostrophe as thousands separator and a dot for the decimals separator. I am not sure if this can be done with the current formatting options. At least, I did not succeed using the propfmt='#.##0,00" €"'
on a DataTable column.It is possible to format the number through SQL DuckDB 1.1.0:
D select format ('{:t.} €', 1234.56);
and get the string1.234,56 €
. However, all number related props and charts will no longer work on this column.How should it work?
Ideally, keep the format and specify locale.
<MyNewComponent fmt='eur2' loc='de-DE' />
Beta Was this translation helpful? Give feedback.
All reactions