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

  1. ===============================================================================
  2.                   Internationalization (I18N) For OS/2                 
  3. ===============================================================================
  4.  
  5.                 Copyright IBM Corporation -- 1993, 1994, 1995
  6.  
  7. DISCLAIMER: This I18N package has been made available solely to gauge OS/2
  8. developer interest in the industry standard XPG4 internationalization 
  9. programming model. This does not mean that IBM will introduce a product based
  10. on the contents of this package. This package is not a full implementation of 
  11. the X/Open XPG4 specification and does not make any claims of XPG4 branding. 
  12. It implements only the portions of the XPG4 specification which deal with 
  13. internationalization.
  14.  
  15. X/Open is a trademark of the X/Open Company Limited.
  16.  
  17. ===============================================================================
  18.  
  19.  
  20. /************************/
  21. /***     Contents     ***/
  22. /************************/
  23.  
  24. 1.  Overview
  25. 2.  Files in this directory
  26. 3.  How to run the sample program
  27. 4.  How to compile the sample program
  28.  
  29.  
  30. 1.  Overview
  31. ============
  32.  
  33. The sample program in this directory demonstrates the use of culturally-based
  34. date and time formatting functions (strptime, strftime, wcsftime).  These APIs
  35. allow formatting to and from strings (and wide char strings) to the "time_t"
  36. structure.  The formatting for these functions is based on the current locale,
  37. as defined with environment variables.
  38.  
  39.  
  40. 2.  Files in this directory
  41. ===========================
  42.  
  43. File            Purpose
  44. ------------------------------------------------------------------------------
  45. dt.c            Source code for the dt sample program.
  46. dt.def          Definition file needed for compiling the program.
  47. dt.mak          Make file used to compile the sample.
  48. dt.exe          Compiled version of the dt sample.
  49.  
  50. build.cmd       A command file which will compile and link the sample program.
  51. read.me         This file.
  52.  
  53.  
  54. 3.  How to run the sample program
  55. =================================
  56.  
  57. This sample program shows how one can perform culturally-based time and date
  58. formatting, for both char and wchar_t data types.  The following steps show
  59. how the program can be run.
  60.  
  61.      1) Run the \i18n\bin\new_vars command file (or have the environment
  62.         variables already set).
  63.  
  64.      2) Set the value of either LC_ALL or LANG to: en_us (US English).
  65.  
  66.           Ex:   set LANG=en_us
  67.  
  68.      3) Execute the dt.exe program.
  69.  
  70.           Ex:   dt
  71.  
  72.      4) The output from the program should be (note that the date and time
  73.          for the last two statements is based on your system's current date
  74.          and time):
  75.  
  76.           Locale for date and time: ENUS437
  77.  
  78.           Loaded in date:  10/21/93 and time:  12:34:56
  79.  
  80.           Today is: Friday, March 18 1994. Time is:  11:28:47 AM
  81.  
  82.           Date converted with wchar_t type:
  83.           Today is: Friday, March 18 1994. Time is:  11:28:47 AM
  84.  
  85.      5) Experiment with changing the values of the LANG environment
  86.         variable.
  87.  
  88.  
  89. 4.  How to compile the sample program
  90. =====================================
  91.  
  92. NOTE: The sample program is already compiled for you.  If you want to see the
  93.  behavior of the program, you can just run it.  The following instructions
  94.  are needed only if you want to modify the program and recompile it.
  95.  
  96. To compile the sample application:
  97.  
  98.      1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
  99.         correctly on your system.
  100.  
  101.      2) cd to the directory which contains the collate source files.
  102.  
  103.      3) Type "build" at the command prompt.
  104. 
  105.