Example: Locales as part of a multilingual environment

The IBM® i operating system, through the use of locales, user profiles, and subsystems, can provide a multilingual environment. Users of a system that is set up for multilingual environments can work with their national language and all of its cultural conventions (for example, the character used to separate hours, minutes, and seconds).

Assume that the system used in this example has its primary language defined as English and the secondary national language versions (NLVs) for French and Spanish have been installed.

Follow the steps in this example to perform the following tasks:

  • Create the locales for English, French, and Spanish.
  • Create user profiles for users named: English, French, and Spanish.
  • Create separate subsystems for French and Spanish language users.

Step 1. Creating locales

  1. Type CRTLOCALE and press the Prompt key (F4).
  2. Enter these values for the following fields:
    • Locale name: qsys.lib/localelib.lib/en_us.locale
    • Source file path name: qsys.lib/qsyslocale.lib/qlocalesrc.file/en_us.mbr
    • Coded character set ID: 37
    • Generation severity level: 20
    • Text 'description': US English locale
  3. Press Enter.

Repeat the CRTLOCALE command for the FRENCH and SPANISH locales, using these values for the following fields.

For the French locale:

  • Locale name: qsys.lib/localelib.lib/fr_fr.locale
  • Source file path name: qsys.lib/qsyslocale.lib/qlocalesrc.file/fr_fr.mbr
  • Coded character set ID: 297
  • Generation severity level: 20
  • Text 'description': French locale

For the Spanish locale:

  • Locale name: qsys.lib/localelib.lib/es_es.locale
  • Source file path name: qsys.lib/qsyslocale.lib/qlocalesrc.file/es_es.mbr
  • Coded character set ID: 284
  • Generation severity level: 20
  • Text 'description': Spanish locale

You have created three locales (EN_US (English US), FR_FR (French), and ES_ES (Spanish). They are stored in library localelib.lib.

Step 2. Creating the user profile

In this example, three user profiles are created; each one will use one of the locales that was just created. The user profile names are English, French, and Spanish.

  1. Type CRTUSRPRF and prompt (F4).
  2. Type ENGLISH for the User profile parameter value.
  3. Scroll forward until you see the Locale job attributes parameter and the Locale parameter.
  4. Type:
    • /qsys.lib/localelib.lib/en_us.locale for the Locale parameter value.
    • Type + for the Locale job attributes parameter value and press Enter. Type:
      *CCSID
      *DATFMT
      *DATSEP
      *TIMSEP
      *SRTSEQ
      *DECFMT
    Note: At job start, the system finds the actual job attribute values defined in the locale object. The job attributes found in the locale override the values specified in the user profile fields for the CCSID and SRTSEQ parameters. They also override the date format, date separator, and time separator job attributes specified in any system value.
  5. Press Enter. You have now created the user profile for a user named ENGLISH.

Repeat the CRTUSRPRF command for user IDs FRENCH and SPANISH. The next two displays provide the correct Locale parameter and Locale job attribute information for creating the user profiles for FRENCH and SPANISH.


Locale job attributes  . . . . . > *CCSID        *SYSVAL,*NONE, *CCSID...       
> *DATFMT                                                                       
> *DATSEP                                                                       
> *TIMSEP                                                                       
> *SRTSEQ                                                                       
Locale . . . . . . . . . . . . . >'/qsys.lib/localelib.lib/fr_fr.locale'        

Locale job attributes  . . . . . > *CCSID        *SYSVAL,*NONE, *CCSID...       
> *DATFMT                                                                       
> *DATSEP                                                                       
> *TIMSEP                                                                       
> *SRTSEQ                                                                       
Locale . . . . . . . . . . . . . >'/qsys.lib/localelib.lib/es_es.locale'        

Step 3. Creating subsystems for each national language version

Subsystems can be tailored to provide users an environment in which they see their own national language with data presented in the cultural format and conventions they are used to seeing.

Note: Because the primary language of the system is English, it is not necessary to create a subsystem for English.
  1. Type CRTSBSD and prompt (F4).
  2. Specify values for the following parameters to ensure that the subsystem is enabled for a specific national language (such as French and Spanish in our example).
    • Subsystem description

      This can be any name you choose.

    • Text 'description'

      The description can be anything you want it to be.

    • Sign-on display file and Library

      This often is QDSIGNON. The important information here is to know the name of the library where the national language version (French in this example) is stored.

    • Subsystem library

      It specifies a library that is entered ahead of other libraries in the library list of jobs started in this subsystem. This parameter allows you to use a secondary language library causing messages and displays to appear in your spoken language.

      Note: The correct values for Sign-on display file library and Subsystem library parameters are determined by adding QSYS to the national language version feature code. For example, the French national language library is named QSYS2928.

      The following screen shows the correct values to ensure that users of the FRENCH subsystem interact with the computer in the French language.

      
      Create Subsystem Description (CRTSBSD)                                          
                                                                                      
      Type choices, press Enter.                                                      
                                                                                      
      Subsystem description  . . . . . SBSD         > FRENCH                          
      Library  . . . . . . . . . . .                  *CURLIB                         
      
      
      Text 'description' . . . . . . . TEXT         > 'Subsystem for French users'    
                                                                                      
      Additional Parameters                                                           
                                                                                      
      Sign-on display file . . . . . . SGNDSPF      > QDSIGNON                        
      Library  . . . . . . . . . . .              >   QSYS2928                        
      Subsystem library  . . . . . . . SYSLIBLE     > QSYS2928                        
      More...                                                                         
      F3=Exit   F4=Prompt   F5=Refresh   F12=Cancel   F13=How to use this display     
      F24=More keys
  3. Press Enter.

Step 4. More information about subsystems

Creation of a subsystem requires additional work such as:

  • Setting subsystem attributes
  • Adding workstation entries
  • Adding job queue entries
  • Adding communications entries (if your national language users are attached over communications lines)
  • Adding autostart job entries if you want to use this feature
  • Adding prestart job entries if you want to use this feature
  • Creating a class
  • Adding routing entries

How to perform the tasks in the previous list is not described in this example.