parlez muchos sprachen - controlling languages in z/OS Explorer
JoeWinchester 110000DQA0 Visits (1773)
At IBM we're very proud of the fact that our explorer family of products is used not only by English folks (including American Englanders - howdy to ya'll) but by users in many of the lands where z/OS and CICS can be found doing its stuff. To show how much we appreciate this we translate the z/OS and CICS Explorer user interface into eight additional languages over and above English. When the program starts a quick check is made to the user's PC to see the language it's running in and used to select the right explorer language. This is pretty clever, except that recently I've seen a number of requests from folks asking "I am not English and my PC is in my native language, however I don't like the fact that the explorer is in the PC's language - how can I get the explorer to always boot up in English ?", or for that matter, in German, when my PC's language is English. In other words "How can I control the language that the Explorer users"
This blog will describe how to do that, as well as contain nerdy information about how language packs and locales work and by the end of it you won't just be able to switch languages, you'll understand how the magic start-up lines actually control the code that creates the user interface, all of which is super excellento stuff.
Every language has an ISO language code associated with it that has an abbreviated code. To control the language you use a parameter to the program of -nl followed by the language code. France's code is fr and the screen shot below for a Windows shortcut points to a z/OS Explorer location where the argument -nl fr has been added.
This argument overrides the automatic language selection, so even though my PC is configured to be English, the explorer starts up in French. Superb ! If instead of fr you use the language code zh it launches in Simplified Chinese. 高超
The language codes supported by the z/OS and CICS Explorer are:
As well as specifying startup arguments on the shortcut you can add them to the .ini file for the explorer. The z/OS Explorer' executable is called zosexplorer.exei and in the same folder as the .exe you'll find an .ini file with the same prefix, i.e. zosexplorer.ini
The lines to add to the .ini file are -nl and XX where XX is the language code you want the explorer to start up in. These must be on separate lines in the .ini file. if you write -nl fr on the same line it has no effect, it must be -nl on one line and the language code argument fr (or another language code you want to use) on the following line. Also when you ad the lines they must be be before the -vmargs line in the .ini file, adding them afterwards will get a rather nasty "Virtual machine failed to start" error message which can be difficult to diagnose.
If the .ini file has a -nl line, and so does the desktop shortcut, then the shortcut wins.
The technique for changing the startup language - which is adding the -nl XX argument to the program, where XX is the locale code, works for z/OS Explorer, CICS Explorer, and also Rational Developer for System z. The only difference is that you need to use the .ini for the product you're using, so if the executable is called eclipse.exe then the -nl line goes into eclipse.ini in the same folder.
Geeky more advanced stuff to find the available languages for an Eclipse based product
Switching language under the covers is done by loading the user visible strings (the ones you can see on the screen) from a set of files that have been supplied by IBM. There's no clever logic that dynamically translates logic the same way my son uses web translaters to get his homework done. We - IBM - put all of the strings in the z/OS Explorer into files that are key value pairs, and we then translate all of the values into different languages that we want to support.
If you want to know the possible languages that you can switch a product into then you need to know the list of language bundles that it came with. Assuming you don't know the list (i.e. the docs aren't easily to hand) then you can actually look into an Eclipse based product, such as zos or CICS Explorer or RD/z and see the bundles themselves. The way to do this is to navigate to the folder containing the explorer and open the plugins folder, in here you'll see a lot of .jar files. For some of the .jar files there will be ones with .nl appended to the name,
An example is shown above where there is the plugin com.
The file containing the key value pairs is called plugin.properties (the original being in the plugin itself) and the language bundles are called plug
I hope this makes sense - by understanding how the -nl argument works, where it need to be set, and how to see what the available languages are you should be able to control the language that the z/OS Explorer, or CICS Explorer, or Rational Developer for System z, or any other Eclipse based offering display itself in.