Hi, How can I set the "Milestone number" so that the dot is displayed as a spacer for the thousands instead of the comma, i.e. 10.000 in Italian style and not 10,000 in American format?
Can I act on any statement in the wp-content/themes/salient/js/src/init.js file?
Hi Judith, if I enter 4.860 in the field Milestone Number, only 4 is displayed in the counter on the website, I assume because it reads the point as a decimal divisor (as it is in the American format) and consequently truncates 860.
In fact, if I put 4,860 it is interpreted correctly (like when I put 4860) and the counter on the website shows 4,860 naturally with the comma, i.e. in American format.
My WordPress is set on the Italian localization and therefore all the website numbers, except in the Milestone, are displayed correctly in European format (as are the dates).
Any other ideas, even getting your hands on the code?
I think it would be enough to know where to add a javascript .toLocaleString() output in a file like wp-content/themes/salient/js/src/init.js without any guarantee of its working on your part you mean...
Hi Tahir, done the update to Salient Version 15.0.7+, we're almost there.
If there was a way to put 3 decimals instead of 2 you could work around the problem by entering 9.999 instead of 10000 (and 49.999 instead 50000) and, in my case, it would be displayed just in European format.
Unfortunately, however, since there are only 2 decimals, even by inserting 9.999 and 49.999 it comes as in the attached image.
In this way it is not possible to obtain 10.000 on the website but only 10.001 or 9.999 because by entering 10.000 in the Milestone Number field the decimals are not detected and only 10 is displayed on the website.
To make Europeans fully happy, just edit line 4838 of the wp-content/themes/salient/js/src/init.js file like this:
With this change it will be enough to enter 9.9999 (with 4 decimals) in the Milestone Number field and the number 10.000 will appear on the website because it is rounded to 3 decimals!
Of course I tried to make the change myself but it didn't work, I guess because the code is recompiled in the same file of wp-content/themes/salient/js/build/ folder.
Can you tell me how to fix it?
Thank you very much for the great availability, Emanuela
So, summarizing the solution for those who will read this online post.
Starting from the Salient version subsequent to the current 15.0.8, to have the Milestone counter in European format it is sufficient to enter the desired number separated by a point in the Milestone Number field (of the Milestone Settings popup).
For example, to obtain on the website the counter that increases up to the number 10.000 (written with a divisor point instead of a comma) it is sufficient to write 10.000 in the Milestone Number field.
Thank you so much for your wonderful assistance, Emanuela
Hi,
How can I set the "Milestone number" so that the dot is displayed as a spacer for the thousands instead of the comma, i.e. 10.000 in Italian style and not 10,000 in American format?
Can I act on any statement in the wp-content/themes/salient/js/src/init.js file?
Thanks a lot,
Emanuela
Hi Emanuela,
Thanks for choosing Salient.
You can add on the figure as shown here:
Thanks.
Hi Judith,
if I enter 4.860 in the field Milestone Number, only 4 is displayed in the counter on the website, I assume because it reads the point as a decimal divisor (as it is in the American format) and consequently truncates 860.
In fact, if I put 4,860 it is interpreted correctly (like when I put 4860) and the counter on the website shows 4,860 naturally with the comma, i.e. in American format.
My WordPress is set on the Italian localization and therefore all the website numbers, except in the Milestone, are displayed correctly in European format (as are the dates).
Any other ideas, even getting your hands on the code?
Thanks,
Emanuela
Hi Emanuela,
Please send in your admin login credentials so that we may check this out further.
Thanks.
Hey Again,
At the moment you will have to use the "Motion Blur Slide In" Animation Effect if you wish to have dots or commas:
Thanks
ThemeNectar Support Team
Hi Tahir,
eh it's not quite the same, so it becomes a text string with an animated effect, not a counter.
But it shouldn't be that hard to make him understand the location for the counter and make all Europeans happy :)
I found this thread of yours from 2015/2018 which provides some guidance: https://themenectar.ticksy.com/ticket/144592
I think it would be enough to know where to add a javascript .toLocaleString() output in a file like wp-content/themes/salient/js/src/init.js without any guarantee of its working on your part you mean...
But maybe I'm making it too simple, you tell me.
Thanks,
Emanuela
Hey Again,
Please update to Salient Version 15.0.7 : https://themenectar.com/changelogs/salient.html#:~:text=Added%20ability%20to%20use%20decimals%20in%20%22Milestone%22%20page%20builder%20element
Thanks
ThemeNectar Support Team
Hi Tahir,
done the update to Salient Version 15.0.7+, we're almost there.
If there was a way to put 3 decimals instead of 2 you could work around the problem by entering 9.999 instead of 10000 (and 49.999 instead 50000) and, in my case, it would be displayed just in European format.
Unfortunately, however, since there are only 2 decimals, even by inserting 9.999 and 49.999 it comes as in the attached image.
How can I fix it?
Thanks,
Emanuela
Attached files: Salient.JPG
Escalating this to the developer to check for a quick fix.
Thanks
ThemeNectar Support Team
Hey ThemeNectar,
almost perfect, almost...
In this way it is not possible to obtain 10.000 on the website but only 10.001 or 9.999 because by entering 10.000 in the Milestone Number field the decimals are not detected and only 10 is displayed on the website.
To make Europeans fully happy, just edit line 4838 of the wp-content/themes/salient/js/src/init.js file like this:
if( userDecimals > 2 && userDecimals < 5) {
decimalPlaces = 3;
}
With this change it will be enough to enter 9.9999 (with 4 decimals) in the Milestone Number field and the number 10.000 will appear on the website because it is rounded to 3 decimals!
Of course I tried to make the change myself but it didn't work, I guess because the code is recompiled in the same file of wp-content/themes/salient/js/build/ folder.
Can you tell me how to fix it?
Thank you very much for the great availability,
Emanuela
Great!
So, summarizing the solution for those who will read this online post.
Starting from the Salient version subsequent to the current 15.0.8, to have the Milestone counter in European format it is sufficient to enter the desired number separated by a point in the Milestone Number field (of the Milestone Settings popup).
For example, to obtain on the website the counter that increases up to the number 10.000 (written with a divisor point instead of a comma) it is sufficient to write 10.000 in the Milestone Number field.
Thank you so much for your wonderful assistance,
Emanuela