cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
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!

7 REPLIES 7
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

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

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 

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" ! 

 

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

 

Georg
Level VII

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
Craige_Hales
Super User

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

I don't think there is a way to script the language setting. The language setting is stored in the windows registry, but JMP won't be monitoring the registry for changes, so even if you write some scary registry editing code, it won't take effect until the next JMP launch. Restoring the user's language pref will take another launch, and you are likely to leave the user with a JMP running in a language that makes it hard for them to use the preferences.

RegeditRegedit

from question

 

Craige