Full stops converted to decimal commas in Inspector when spanish OS profile is in use

Hi there:

Foremost, thanks for make the Inspector a reality. That’s a terrific tool not only to debug, but indeed to make a light (but very useful) “live” authorship of 3D scenes, tweaking this and that from the GLTF/GLB files.

We’re making an intense use of it in each of our 3D web interactive projects, modifying values in order to see how that is looking in the scene, copy&pasting some values to the code in order to develop animation “stories” and so on.

Only one issue with it, that I suppose it’s related with non-EN OS profiles, more specifically with the way decimal values are managed in different languages (cultures).

For example, here in Spain, we use decimal commas instead full stops. So, when we proceed to edit any value (please note the 8.720 in position.y):

…decimal full stops are shown as decimal commas in the edit box (note that now we have an 8,721),…

…so well, after tweaking it to the desired value and make a copy&paste to the code editor, an additional (and annoying) step of revert in code the comma to the full stop must be done.

Also, as a collateral effect of this behavior, when a value is channeled via animation, it is show with a comma for each keyframe.

Any thought on this?

Thanks for your time.

1 Like

cc @carolhmj

Thanks for your comment, @PirateJC will be very satisfied with it :smiley:

We use HTML input elements for the inspector, and their usage of commas or periods is dependent of the browser locale, so this might be the cause of the behavior. We could explicitly set the locale to english so it’s consistent, but I’m not sure if this could cause other problems. @PatrickRyan what do you think? :thinking:

@paleRider, just so I understand the pain point are you saying that pasting a value with a full stop in the string will have the full stop replaced with a comma? Or are you saying that you have a copied value that has a comma in it and when you paste the value, you need to go in and change the comma to a full stop? In either case, we need to have a solve to reduce this pain point but am wondering about the best approach.

Do you work primarily with commas for decimal values to full stops? Is it the browser which is causing a problem due to a character replacement, or is it that the inspector is not flexible enough to accept and/or convert the commas to full stops itself?

I’m wondering, @carolhmj if we should just validate the string and automatically change the value to the formatting that Babylon expects, or if we should set locale. I anticipate the forcing a locale could potentially cause unwanted side effects that I would not see coming due to the fact that I work in an English locale. So I am wondering if a simple validation and conversion of characters for any number entered would be the best route. It would not cause unexpected side effects in the browser and it would allow for some flexibility in pasted values to either contain commas or fill stops for decimal values. Thoughts?

1 Like

Hi there, @PatrickRyan and thank you all the people (@sebavan, @carolhmj) trying to help with this issue of mine.

The described, let’s say “disconfort”, is about to access any Inspector’s editbox/textbox, and have the full-stops converted to commas as soon as you edit the value in it; so as soon as you try to copy&paste that value to a code file an additional reversion of the commas to fullstops must be done in order to avoid a syntax error.

For your information, my OS (Win10) is configured in Spanish but I’m experimenting this behavior with a English version of the browser (FF, Chrome, …).

Thanks for your time.

Hello! Apologies for not following up on this before

Hmmm, so the Inspector initially displays the values to you with a period, but as soon as you edit it, it converts to commas? Or does the inspector displays with a comma from the beginning?

im also having an issue now with periods and commas. It displays as periods in the inspector, but if I copy the value to the clipboard and paste in a code editor , it is then a comma. Arrgg

I know this rubbish has to do with locales , I have had to deal with it in c# unity before. Honestly I cant think who these people are in the world that these locale setting try to appease - that use commas in numbers/maths.

what torture , why would you do that to yourself… its almost as bad as using imperial units. The entire world uses metric … and americans punish themselves. :wink:


ok back on point, I cant say the inspector was not like this before , I also only discovered it recently but regardless … its something i do not want.

Hi @shaderbytes:

Well, for instance, in Spain and spanish-heritage culture, commas are for decimals and periods for thousands.

Also, a billion is a million of millions and not a thousand of millions. So basically is a lot harder becoming a billionaire. :smiling_face_with_tear:

Best regards.

Woah, I didn’t know that :open_mouth: In Portuguese it’s a thousand of millions, a million of millions is trilhão

fair info thanks , but then it proves something is wwrong … because it is displaying periods for decimals and when copied it produces commas … so not consistent to either way