home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
i18nv102.zip
/
SAMPLE
/
MONEY
/
READ.ME
< prev
Wrap
Text File
|
1995-09-19
|
4KB
|
113 lines
===============================================================================
Internationalization (I18N) For OS/2
===============================================================================
Copyright IBM Corporation -- 1993, 1994, 1995
DISCLAIMER: This I18N package has been made available solely to gauge OS/2
developer interest in the industry standard XPG4 internationalization
programming model. This does not mean that IBM will introduce a product based
on the contents of this package. This package is not a full implementation of
the X/Open XPG4 specification and does not make any claims of XPG4 branding.
It implements only the portions of the XPG4 specification which deal with
internationalization.
X/Open is a trademark of the X/Open Company Limited.
===============================================================================
/************************/
/*** Contents ***/
/************************/
1. Overview
2. Files in this directory
3. How to run the sample program
4. How to compile the sample program
1. Overview
============
The sample program in this directory shows how to format monetary strings in
a culturally sensitive manner with the strfmon API. The program demonstrates
a number of different formats (international, national).
Be aware. however, that not all monetary symbols (such as the yen symbol, or
the British pound sign can be displayed in all code pages. The I18N routines
convert the string to the proper code points - it is important for the machine
to be in the proper code page to be able to display the symbol. For example,
the yen symbol is not represented in the US standard code page 437. The place
in that code page is occupied by the backslash character. Thus, if you run
this program in the Ja_JP locale, you will notice that the final amount has
a leading slash. If the program were run on a japanese machine, the proper
yen sign would be displayed.
2. Files in this directory
===========================
File Purpose
------------------------------------------------------------------------------
money.c Source code for the money sample program.
money.def Definition file needed for compiling the program.
money.mak Make file used to compile the sample.
money.exe Compiled version of the money sample.
build.cmd A command file which will compile and link the sample program.
read.me This file.
3. How to run the sample program
=================================
The following steps show how the program can be run.
1) Run the \i18n\bin\new_vars command file (or have the environment
variables already set).
2) Set the value of either LC_ALL or LANG to: en_us (US English).
Ex: set LANG=en_us
3) Execute the money.exe program.
Ex: money
4) The output from the program should be:
Locale for monetary: ENUS437
Value is 12345.6789 Symbol-less format 12345.68
Value is -12.6789 International format USD 12.6789-
Value is 45.6789 National format $0000045.68
5) Experiment with changing the values of the LANG environment
variable. Try the fr_fr locale to see the difference in the
results. Note: You may wish to change the codeset of OS/2
to 850 before running this program with the french locale.
This can be done with the 'chcp' command:
Ex: chcp 850
When you are finished, change the codepage back to 437.
4. How to compile the sample program
=====================================
NOTE: The sample program is already compiled for you. If you want to see the
behavior of the program, you can just run it. The following instructions
are needed only if you want to modify the program and recompile it.
To compile the sample application:
1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
correctly on your system.
2) cd to the directory which contains the is source files.
3) Type "build" at the command prompt.