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
Highlighted
Franck_R
Level III

Manage the display language with JSL (or freezing english language for distribution platform...)

Hi,

 

My problem is rather "simple": I would like to be sure that my script is always displaying same graphics regardless of the language that JMP is displaying.

For example I have created a script that automatically analyses some products, makes graphics and so on and export all of that in a powerpoint to shares things with an other company's site in USA

But when this script is executed on a computer where the user is using french language: things like distribution charts are displaying “tolerance inférieure” “cible” “tolerance supérieure” instead of “LSL” “target” “USL” which is a bit annoying…

So how can I check, by scripting in jsl,  the display language of the user, then change it if it is not english (and get thinks back at the end of the script) or freeze the display in english of the name of spec limits references lines?

I have yet solved a lot of problems of sharing script with people with “ignore platform preferences( 1 )” but for distributions it is still a concern… And I haven’t found anything related to display language in “show Preferences”

 

Thank you!

6 REPLIES 6
Highlighted
julian
Community Manager Community Manager

Re: Manage the display language with JSL (or freezing english language for distribution platform...)

Hi @Franck_R,

I can see why that would be a problem! First, something I can help with: the following jsl returns the current system/jmp language locale:

System Service( Get Language Code );

For instance, if running on a computer set to an English display language, this will return "en." 

 

With that information, you can at least identify when you need your script to make a change before running.  But, this is where it might be tricky. Are your scripts running on a Mac or Windows machine? On Windows machines, language preferences are set in the jmp preferences and *should* be able to be changed via script. On Mac, language preferences are set in the MacOS preferences, and I expect it will be a bit more tricky to set via jsl (but not impossible given that we can use RunProgram() in jsl).

 

That said, on the "easier" problem, Windows machines, I haven't been successful in finding the right jsl to set the jmp language. There is the additional wrinkle that after changing the jmp language it's often best to restart jmp because certain displays will not update to the selected language until jmp is quit and reopened. That presents a bit of a problem if you want to have your scripts to work as you described: make the language change, evaluate, and then return to the initial language settings. 

 

I'll keep trying some things, and hopefully others have some additional suggestions.

 

@julian

Highlighted
Franck_R
Level III

Re: Manage the display language with JSL (or freezing english language for distribution platform...)

Hi Julian,

 

Thank you for you answer!

This

System Service( Get Language Code ); 

is indeed a useful command to know, thanks a lot! I can popup a window to warn people that their language system is not English and advice them to run again the script after a language change. For windows users at least…(good point to know too!)

For the fact that it is a better thing to restart JMP after a language change: I have tried  my script after a french to english  change several time without any trouble to the behavior of my code (every graphical displays were correct and in english)

I have thought to put something like

Language Switch Warning( 1 ),

just to make things clean for the user point of view during the switch french/english/french

 

I hope that you will find something for setting the language code in jsl!

Thank you

Franck

Highlighted
julian
Community Manager Community Manager

Re: Manage the display language with JSL (or freezing english language for distribution platform...)

Hi @Franck_R,

Glad to hear that you do not need to restart jmp after the language change, that simplifies things. If it's acceptable to prompt the user to change their language, you could do the following for users on a Mac to bring up the Language and Region preference pane:

Run Program(
	Executable( "/usr/bin/open"),
	options( {"/System/Library/PreferencePanes/Localization.prefPane/"} )
);

@julian 

Highlighted
Franck_R
Level III

Re: Manage the display language with JSL (or freezing english language for distribution platform...)

Hi @julian  

 

Thank you: this one too is a "good to know command" ! 

 

Highlighted
SteveTerry
Level III

Re: Manage the display language with JSL (or freezing english language for distribution platform...)

Hi @julian,

Can you please provide more info on the System Service function.  I looked all over for documentation on it, but couldn't find any.  I have a similar question on accessing System Preferences generally and date format settings specifically.  I created an overly complicated workaround, but I'm hoping this function might simplify things for me.  Thanks!

-Steve

 

Highlighted
Georg
Level IV

Re: Manage the display language with JSL (or freezing english language for distribution platform...)

Can anybody please share how to switch the language Preference to English by JSL?

We would like to ensure, that everybody uses the english Version of JMP.

Thanks in Advance, Georg

Georg
Article Labels

    There are no labels assigned to this post.