How can one change the default decimal separator from ‘.’ to ‘,’ ? I’d like to see 3,14 instead of 3.14, treated as a number.
I’ve tried the following so far, none of them worked:
- change language to ‘de-DE’, thinking that comma would be the default separator
- change column configuration to
{ type: 'numeric', numericFormat: { culture: 'de-DE', pattern: '0,0' }
- pattern does not seem to have any effect at all, I’ve tried numerous different patterns
If this is achievable, please let me know how. Thanks.
I haven’t had any luck with what you pasted above. Without registering the language in numbro, culture selection does not have any effect. I managed to make it work like this though:
import * as numbro from 'numbro';
import hungarianLanguage from 'numbro/dist/languages/hu-HU.min';
…
// somewhere before table initialization, e.g.: in Angular, constructor of the wrapper
numbro.registerLanguage(hungarianLanguage);
```
...
```
{
type: 'numeric',
numericFormat: {
culture: 'hu-HU',
},
}
```
Thanks for the quick reply. Cheers.
I am glad that you have figured it out, Daniel.
I guess that we can close the topic.