DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Constructing and using message catalogs

Running the application program

Now that the message catalog and the program have been compiled, the program is ready to be executed. Before continuing, you should ensure that the English and French hello.cat files are in the ./english and ./french subdirectories respectively.

Next at the command line prompt, enter:

  1 $ ./setup
  2 $ LANG=english; export LANG
  3 $ ./hello

line 1
Runs the setup program that compiles the message catalog and the program.

line 2
Sets the environment variable LANG\*(F to ``english'' and then it exports it to the environment.

line 3
Runs the actual program, this line will produce output that looks similar to this:

Hello everyone. It's Fri Oct 13 01:03:52 1973

Next the following two lines should be entered:
  1 $ LANG=french; export LANG
  2 $ ./hello

line 1
Sets the environment variable LANG to ``french'' and then it exports it to the environment.

line 2
Again, the program is run, except that now the following output is printed instead:

Bonjour tout le monde. C'est ven 13 oct 01h03 1973


Footnotes

Note that though XPG4 has suggested a certain format to define a particular locale, implementations are free to define their own format. Therefore, though it is acceptable to set LANG to ``english'' or ``french'', these definitions do not match the XPG4 convention. . . .

Previous topic: Combining the message catalog and the application program

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003