Change decimal separator from '.' to ','

Tags: #<Tag:0x00007f8b1db56170>

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.

Hi @daniel.tamas.fazekas

It seems to work fine for the last column http://jsfiddle.net/handsoncode/xbj2g41z/

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.