# Thousand separator (number mustache formatting)

**URL:** https://discourse.nodered.org/t/thousand-separator-number-mustache-formatting/79240
**Category:** Dashboard
**Created:** [16 June 2023 07:10 UTC](https://discourse.nodered.org/t/thousand-separator-number-mustache-formatting/79240 "2023-06-16T07:10:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![moimeme](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@moimeme](https://discourse.nodered.org/u/moimeme)
#### Post date: [16 June 2023 07:10 UTC](https://discourse.nodered.org/t/thousand-separator-number-mustache-formatting/79240/1 "2023-06-16T07:10:45Z")

</div>

Hello,  
I'm using mustache formatting to set decimal places on numbers in gauge with great success.  
However, I cannot set a locale as describe here:

> **[Angular](https://angular.io/api/common/formatNumber)**
>
> Angular is a platform for building mobile and desktop web applications.
> Join the community of millions of developers who build compelling user interfaces with Angular.

The result is that I have a comma as thousand separator that I would like to get rid off.  
Is there a way to set locale preference somewhere (in config files maybe)? Or a special formatting like:

```auto
{{value | number:1}}

```

to set custom locale preferences?

I guess the more versatile way would be a change node to set the string exactly to what I need before sending values to the dashboard. What do you think?

Thanks,

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [16 June 2023 09:52 UTC](https://discourse.nodered.org/t/thousand-separator-number-mustache-formatting/79240/2 "2023-06-16T09:52:50Z")

</div>

The ui nodes do not use mustache, it looks similar but is angular js.

It looks like the local machine or something in the ui nodes is overriding the locale.  
As this should work  
`{{msg.payload | number : 1 : "fr"}}`

Try setting the locale of the device displaying the ui nodes to the locale you need.

You can not feed `23,4` into ui nodes as it will not see them as numbers and therefore will not be displayed.

---

<div class="post-metadata">

### Author: ![moimeme](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@moimeme](https://discourse.nodered.org/u/moimeme)
#### Post date: [16 June 2023 10:22 UTC](https://discourse.nodered.org/t/thousand-separator-number-mustache-formatting/79240/3 "2023-06-16T10:22:34Z")

</div>

Thank you,  
Alas, none of the 2 solutions work (adding locale to the format field and setting locale of the PC).  
I guess I will format the string with function node before the ui nodes.

---

<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: [16 July 2023 10:22 UTC](https://discourse.nodered.org/t/thousand-separator-number-mustache-formatting/79240/4 "2023-07-16T10:22:58Z")

</div>

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