Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
0 Kudos

JSL command to Get and Set the Display Language in JMP

I would like a JSL command that allows me to change the Display Language in JMP - not only the check box below the language, but the language itself. Being able to check what Display Language is currently used, would also be very helpful.

 

When using Display Language English on a German OS, I can use the checkbox below to tell JMP if decimal points (tick) or decimal commas (no tick) are expected.

When using Display Language German on a German OS, the tick makes no difference in that respect.

As our users have both language options it's important to know what language they're using in JMP before a common script is run on their system. Currently I can only think of a poor workaround to check the language and give a warning if they're using the wrong language for the script they want to use.

JMP_DisplayLanguage.PNG

Tracking Number:

Defect ID: S1559390

5 Comments

Would a decimal separator preference (available via the UI or JSL) solve your problem? So instead of changing the display language, you'd set the decimal separator preference to "." or "," as appropriate. 

Level V

If I had a direct handle on the decimal separator, that would be a great help! If I understand you correctly, this would be independent of the choice of Display Language or the check box below it, right?

Ideally, it would be available via the UI and JSL, because both scenarios are relevant.

So, the check box below the language would still handle currency and date formats, but would not affect the decimal separator sign, which instead would be handled by an additional check box below the current one... something like that?

For scripts it would be important to be able to control that new check box via JSL.

 

I assume that there might be issues with setting the language using JSL, because it is currently not guaranteed that everything works perfectly without restarting JMP after a language switch. If that's the case, at least having a JSL function to get the language would be helpful for situations where people run scripts that are only validated in a particular language. At the start of that script I would get the language setting and terminate further execution if the user isn't running JMP in the validated language.

 

Thank you for looking into this! Much appreciated!

The new decimal separator preference would complement the existing Display Language selection and checkbox. With the new preference, you'd be able to tell JMP to either 1) use the default decimal separator as determined by the other language settings (this is existing JMP behavior), or 2) use a symbol you specify as the decimal separator, regardless of other language settings. So the check box below the language would still have an effect on the decimal separator for 1) but not for 2).

 

On a separate note, you can use the following JSL to retrieve the current language: 

System Service( Get Language Code );

which will return "en" for English and "de" for German. 

Level V

Sounds fantastic. Thanks a lot, David!

Thank you also for the JSL code. Works great!

Community Manager
Status changed to: In Development

We're working on preferences for setting custom decimal separator, thousands separator, currency decimal separator, and currency thousands separator. This will be available in JMP 16.