sysinth.inc 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 1999-2000 by the Free Pascal development team
  4. International settings for Sysutils unit.
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {
  12. All the variables presented here must be set by the InitInternational
  13. routine. They must be set to match the 'local' settings, although
  14. most have an initial value.
  15. These routines are OS-dependent.
  16. }
  17. { ---------------------------------------------------------------------
  18. Upper/lowercase translations
  19. ---------------------------------------------------------------------}
  20. type
  21. TMonthNameArray = array[1..12] of string;
  22. TWeekNameArray = array[1..7] of string;
  23. TFormatSettings = record
  24. CurrencyFormat: Byte;
  25. NegCurrFormat: Byte;
  26. ThousandSeparator: Char;
  27. DecimalSeparator: Char;
  28. CurrencyDecimals: Byte;
  29. DateSeparator: Char;
  30. TimeSeparator: Char;
  31. ListSeparator: Char;
  32. CurrencyString: string;
  33. ShortDateFormat: string;
  34. LongDateFormat: string;
  35. TimeAMString: string;
  36. TimePMString: string;
  37. ShortTimeFormat: string;
  38. LongTimeFormat: string;
  39. ShortMonthNames: TMonthNameArray;
  40. LongMonthNames: TMonthNameArray;
  41. ShortDayNames: TWeekNameArray;
  42. LongDayNames: TWeekNameArray;
  43. TwoDigitYearCenturyWindow: Word;
  44. end;
  45. var
  46. DefaultFormatSettings : TFormatSettings = (
  47. CurrencyFormat: 1;
  48. NegCurrFormat: 5;
  49. ThousandSeparator: ',';
  50. DecimalSeparator: '.';
  51. CurrencyDecimals: 2;
  52. DateSeparator: '-';
  53. TimeSeparator: ':';
  54. ListSeparator: ',';
  55. CurrencyString: '$';
  56. ShortDateFormat: 'd/m/y';
  57. LongDateFormat: 'dd" "mmmm" "yyyy';
  58. TimeAMString: 'AM';
  59. TimePMString: 'PM';
  60. ShortTimeFormat: 'hh:nn';
  61. LongTimeFormat: 'hh:nn:ss';
  62. ShortMonthNames: ('Jan','Feb','Mar','Apr','May','Jun',
  63. 'Jul','Aug','Sep','Oct','Nov','Dec');
  64. LongMonthNames: ('January','February','March','April','May','June',
  65. 'July','August','September','October','November','December');
  66. ShortDayNames: ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
  67. LongDayNames: ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
  68. TwoDigitYearCenturyWindow: 50;
  69. );
  70. { ---------------------------------------------------------------------
  71. Date formatting settings
  72. ---------------------------------------------------------------------}
  73. Var
  74. { Character to be put between date, month and year }
  75. DateSeparator: char absolute DefaultFormatSettings.DateSeparator;
  76. { Format used for short date notation }
  77. ShortDateFormat: string absolute DefaultFormatSettings.ShortDateFormat;
  78. { Format used for long date notation }
  79. LongDateFormat: string absolute DefaultFormatSettings.LongDateFormat;
  80. { Short names of months. }
  81. ShortMonthNames: TMonthNameArray absolute DefaultFormatSettings.ShortMonthNames;
  82. { Long names of months. }
  83. LongMonthNames: TMonthNameArray absolute DefaultFormatSettings.LongMonthNames;
  84. { Short names of days }
  85. ShortDayNames: TWeekNameArray absolute DefaultFormatSettings.ShortDayNames;
  86. { Full names of days }
  87. LongDayNames: TWeekNameArray absolute DefaultFormatSettings.LongDayNames;
  88. { Format used for short time notation }
  89. ShortTimeFormat: string absolute DefaultFormatSettings.ShortTimeFormat;
  90. { Format used for long time notation }
  91. LongTimeFormat: string absolute DefaultFormatSettings.LongTimeFormat;
  92. { Character to be put between hours and minutes }
  93. TimeSeparator: char absolute DefaultFormatSettings.TimeSeparator;
  94. { String to indicate AM time when using 12 hour clock. }
  95. TimeAMString: string absolute DefaultFormatSettings.TimeAMString;
  96. { String to indicate PM time when using 12 hour clock. }
  97. TimePMString: string absolute DefaultFormatSettings.TimePMString;
  98. { ---------------------------------------------------------------------
  99. Number formatting constants
  100. ---------------------------------------------------------------------}
  101. { Character that comes between integer and fractional part of a number }
  102. DecimalSeparator : Char absolute DefaultFormatSettings.DecimalSeparator;
  103. { Character that is put every 3 numbers in a currency }
  104. ThousandSeparator : Char absolute DefaultFormatSettings.ThousandSeparator;
  105. { Number of decimals to use when formatting a currency. }
  106. CurrencyDecimals : Byte absolute DefaultFormatSettings.CurrencyDecimals;
  107. { Format to use when formatting currency :
  108. 0 = $1
  109. 1 = 1$
  110. 2 = $ 1
  111. 3 = 1 $
  112. 4 = Currency string replaces decimal indicator. e.g. 1$50
  113. }
  114. CurrencyFormat : Byte absolute DefaultFormatSettings.CurrencyFormat;
  115. { Same as above, only for negative currencies:
  116. 0 = ($1)
  117. 1 = -$1
  118. 2 = $-1
  119. 3 = $1-
  120. 4 = (1$)
  121. 5 = -1$
  122. 6 = 1-$
  123. 7 = 1$-
  124. 8 = -1 $
  125. 9 = -$ 1
  126. 10 = $ 1-
  127. }
  128. NegCurrFormat : Byte absolute DefaultFormatSettings.NegCurrFormat;
  129. { Currency notation. Default is $ for dollars. }
  130. CurrencyString : String absolute DefaultFormatSettings.CurrencyString;
  131. ListSeparator: Char absolute DefaultFormatSettings.ListSeparator;
  132. type
  133. TSysLocale = record
  134. { Delphi compat fields}
  135. DefaultLCID,
  136. PriLangID,
  137. SubLangID : Integer;
  138. case byte of
  139. { win32 names }
  140. 1 : (FarEast: boolean; MiddleEast: Boolean);
  141. { real meaning }
  142. 2 : (MBCS : boolean; RightToLeft: Boolean);
  143. end;
  144. var
  145. SysLocale : TSysLocale;