# Decimal separator on dashboard Angular filter

**URL:** <https://discourse.nodered.org/t/decimal-separator-on-dashboard-angular-filter/30002>\
**Category:** Dashboard\
**Created:** [13 July 2020 13:58 UTC](https://discourse.nodered.org/t/decimal-separator-on-dashboard-angular-filter/30002 "2020-07-13T13:58:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rei\_vilo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rei_vilo/32/162_2.png) [@rei\_vilo](https://discourse.nodered.org/u/rei_vilo)\
**Post date:** [13 July 2020 13:58 UTC](https://discourse.nodered.org/t/decimal-separator-on-dashboard-angular-filter/30002/1 "2020-07-13T13:58:03Z")

</div>

I'm trying to change the decimal separator from `.` to `,` on a gauge or text.

I'm using Google Chrome as browser and the default locale is set to `fr-FR`.

I've already tried

- Default `{{msg.payload | number:1 }}`

- `{{msg.payload | number:1:fr }}` and `{{msg.payload | number:1:fr-FR }}`— see Angular documentation [DecimalPipe](https://angular.io/api/common/DecimalPipe#decimalpipe)

- `{{msg.payload | number:1| replace:'.':',' }}` — see [Angular Pipe Replace character](https://stackoverflow.com/questions/56062798/angular-pipe-replace-character)

to no avail.

I've also explored

- [I18n / localization of UI / change locale for angular filters (currency, number, ...)](https://discourse.nodered.org/t/i18n-localization-of-ui-change-locale-for-angular-filters-currency-number/2236)

this time successfully, although only after having installed `sudo npm install -g @angular/localize`.

However, `number:1:en-US` has no effect, _ie._ the decimal separator is `,` while it should be `.`. So the locale format seems to be hard-coded.

And the file `~/.node-red/node_modules/node-red-dashboard/dist/i18n.js` says prominently

> Placeholder only - This is NOT a sustainable solution to i18n localisation

Is there a better solution available? Thank you!

* * *

The flow example is attached below.

````auto
[{"id":"7a3218c8.cd6598","type":"ui_button","z":"44a96459.97cf0c","name":"","group":"c89fdb8b.3993a","order":3,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","icon":"","payload":"123.45","payloadType":"num","topic":"","x":230,"y":200,"wires":[["7452882a.6e9dd","a99b8db7.a620f8","8f2f75f2.d093e","6558710d.ce2238","1d7ca451.8ef79c"]]},{"id":"7452882a.6e9dd","type":"ui_text","z":"44a96459.97cf0c","group":"c89fdb8b.3993a","order":2,"width":0,"height":0,"name":"","label":"number:1:fr","format":"{{msg.payload | number:1:fr }}","layout":"row-spread","x":570,"y":220,"wires":[]},{"id":"a99b8db7.a620f8","type":"ui_text","z":"44a96459.97cf0c","group":"c89fdb8b.3993a","order":2,"width":0,"height":0,"name":"","label":"number:1","format":"{{msg.payload | number:1 }}","layout":"row-spread","x":560,"y":160,"wires":[]},{"id":"8f2f75f2.d093e","type":"ui_text","z":"44a96459.97cf0c","group":"c89fdb8b.3993a","order":2,"width":0,"height":0,"name":"","label":"number:1:fr-FR","format":"{{msg.payload | number:1:fr-FR }}","layout":"row-spread","x":580,"y":280,"wires":[]},{"id":"6558710d.ce2238","type":"ui_text","z":"44a96459.97cf0c","group":"c89fdb8b.3993a","order":2,"width":0,"height":0,"name":"","label":"number:1 | replace:'.':','","format":"{{msg.payload | number:1 | replace:'.':',' }}","layout":"row-spread","x":610,"y":340,"wires":[]},{"id":"1d7ca451.8ef79c","type":"ui_text","z":"44a96459.97cf0c","group":"c89fdb8b.3993a","order":2,"width":0,"height":0,"name":"","label":"number:1:en-US","format":"{{msg.payload | number:1:en-US }}","layout":"row-spread","x":590,"y":400,"wires":[]},{"id":"c89fdb8b.3993a","type":"ui_group","z":"","name":"Default","tab":"8b54c72b.4f0cf","order":1,"disp":true,"width":"6","collapse":false},{"id":"8b54c72b.4f0cf","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]```
````

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 August 2020 13:59 UTC](https://discourse.nodered.org/t/decimal-separator-on-dashboard-angular-filter/30002/2 "2020-08-12T13:59:16Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
