diff --git a/elements/nuxeo-results/nuxeo-results.js b/elements/nuxeo-results/nuxeo-results.js
index d9c3ea6036..7ad951b480 100644
--- a/elements/nuxeo-results/nuxeo-results.js
+++ b/elements/nuxeo-results/nuxeo-results.js
@@ -455,9 +455,21 @@ Polymer({
},
_computeCountLabel() {
- return this.resultsCount < 0
- ? this.i18n('results.heading.count.unknown')
- : this.i18n('results.heading.count', this.resultsCount);
+ // Fetch the property value from web-ui-properties.xml
+ const isNumberFormattingEnabled =
+ Nuxeo && Nuxeo.UI && Nuxeo.UI.config && Nuxeo.UI.config.numberFormattingEnabled !== undefined
+ ? Nuxeo.UI.config.numberFormattingEnabled
+ : false; // Default to false if the property is not set
+
+ if (this.resultsCount < 0) {
+ return this.i18n('results.heading.count.unknown');
+ }
+ if (isNumberFormattingEnabled) {
+ const formattedCount = new Intl.NumberFormat().format(this.resultsCount);
+ return this.i18n('results.heading.count', formattedCount);
+ }
+ return this.i18n('results.heading.count', this.resultsCount);
+
},
_sortOptions() {
diff --git a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml
index 792dc7fc3f..7a29bd55d7 100644
--- a/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml
+++ b/plugin/web-ui/addon/src/main/resources/OSGI-INF/web-ui-properties.xml
@@ -56,5 +56,8 @@
${org.nuxeo.web.ui.trustedDomains:=}
+
+ ${org.nuxeo.web.ui.numberFormatting.enabled:=}
+
\ No newline at end of file