How to handle different locale in symbols?

Hi All,

Depending on the locale setting of the user accessing Coresight (meaning you have no control at all), data sent to the symbol uses the locale of the user. E.g. 123,456.789 and 123.456,789 are all valid numbers but are quite reversed when using e.g. european versus american locale.

 

Any ideas how to properly handle this in a symbol? parseFloat won't work. the Globalize.js library Globalize.js · GitHub  requires to know the locale we are working in. And about there my knowledge ends...

I won't be the first one needing to deal with this, so curious what solutions people have chosen.

Parents Reply
  • Looking into that as we speak. A complicating factor i see (when on en-US) is that while i have a value of 123991.555 set for my attribute, and 123991.5546875 is shown in PSE, the value received in the symbol is loosing accuracy, i receive the string "1.2399E+05". That does match the displaydigits setting of 5 of the PI Point, but not something i expected... Thinking about this, this should normally not be an issue for visualizations, but i need to fix in the PI Point for proper testing of decimal digits vs thousands separators.

    I'll update when results are in!

Children
No Data