home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / i18nv102.zip / SAMPLE / MONEY / READ.ME < prev   
Text File  |  1995-09-19  |  4KB  |  113 lines

  1.  
  2. ===============================================================================
  3.                   Internationalization (I18N) For OS/2                 
  4. ===============================================================================
  5.  
  6.                 Copyright IBM Corporation -- 1993, 1994, 1995
  7.  
  8. DISCLAIMER: This I18N package has been made available solely to gauge OS/2
  9. developer interest in the industry standard XPG4 internationalization 
  10. programming model. This does not mean that IBM will introduce a product based
  11. on the contents of this package. This package is not a full implementation of 
  12. the X/Open XPG4 specification and does not make any claims of XPG4 branding. 
  13. It implements only the portions of the XPG4 specification which deal with 
  14. internationalization.
  15.  
  16. X/Open is a trademark of the X/Open Company Limited.
  17.  
  18. ===============================================================================
  19.  
  20.  
  21. /************************/
  22. /***     Contents     ***/
  23. /************************/
  24.  
  25. 1.  Overview
  26. 2.  Files in this directory
  27. 3.  How to run the sample program
  28. 4.  How to compile the sample program
  29.  
  30.  
  31. 1.  Overview
  32. ============
  33.  
  34. The sample program in this directory shows how to format monetary strings in
  35. a culturally sensitive manner with the strfmon API.  The program demonstrates
  36. a number of different formats (international, national).
  37.  
  38. Be aware. however, that not all monetary symbols (such as the yen symbol, or
  39. the British pound sign can be displayed in all code pages.  The I18N routines
  40. convert the string to the proper code points - it is important for the machine
  41. to be in the proper code page to be able to display the symbol.  For example,
  42. the yen symbol is not represented in the US standard code page 437.  The place
  43. in that code page is occupied by the backslash character.  Thus, if you run
  44. this program in the Ja_JP locale, you will notice that the final amount has
  45. a leading slash.  If the program were run on a japanese machine, the proper
  46. yen sign would be displayed.
  47.  
  48.  
  49. 2.  Files in this directory
  50. ===========================
  51.  
  52. File            Purpose
  53. ------------------------------------------------------------------------------
  54. money.c         Source code for the money sample program.
  55. money.def       Definition file needed for compiling the program.
  56. money.mak       Make file used to compile the sample.
  57. money.exe       Compiled version of the money sample.
  58.  
  59. build.cmd       A command file which will compile and link the sample program.
  60. read.me         This file.
  61.  
  62.  
  63. 3.  How to run the sample program
  64. =================================
  65.  
  66. The following steps show how the program can be run.
  67.  
  68.      1) Run the \i18n\bin\new_vars command file (or have the environment
  69.         variables already set).
  70.  
  71.      2) Set the value of either LC_ALL or LANG to: en_us (US English).
  72.  
  73.           Ex:   set LANG=en_us
  74.  
  75.      3) Execute the money.exe program.
  76.  
  77.           Ex:   money
  78.  
  79.      4) The output from the program should be:
  80.  
  81.           Locale for monetary: ENUS437
  82.  
  83.           Value is 12345.6789    Symbol-less format 12345.68
  84.           Value is -12.6789      International format USD 12.6789-
  85.           Value is 45.6789       National format $0000045.68
  86.  
  87.      5) Experiment with changing the values of the LANG environment
  88.         variable.  Try the fr_fr locale to see the difference in the
  89.         results.  Note: You may wish to change the codeset of OS/2
  90.         to 850 before running this program with the french locale.
  91.         This can be done with the 'chcp' command:
  92.  
  93.           Ex: chcp 850
  94.  
  95.         When you are finished, change the codepage back to 437.
  96.  
  97.  
  98. 4.  How to compile the sample program
  99. =====================================
  100.  
  101. NOTE: The sample program is already compiled for you.  If you want to see the
  102.  behavior of the program, you can just run it.  The following instructions
  103.  are needed only if you want to modify the program and recompile it.
  104.  
  105. To compile the sample application:
  106.  
  107.      1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
  108.         correctly on your system.
  109.  
  110.      2) cd to the directory which contains the is source files.
  111.  
  112.      3) Type "build" at the command prompt.
  113.