-
Notifications
You must be signed in to change notification settings - Fork 71
/
LocalePlugin.h
93 lines (73 loc) · 3.09 KB
/
LocalePlugin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/****************************************************************************
* PROJECT: Common include
* FILE: LocalePlugin.h
* CONTENT:
*
* AUTHOR: tim@rowledge.org
* ADDRESS:
* EMAIL:
* RCSID: $Id: LocalePlugin.h
*
*/
/* Locale support definitions */
sqInt sqLocInitialize(void);
/************** Country and language ******************/
/* write the country code into the string ptr. ISO 3166 is the relevant source
* here; see http://www.unicode.org/onlinedat/countries.html for details.
* Using the 3 character Alpha-3 codes */
void sqLocGetCountryInto(char * str);
/* write the 3 char string describing the language in use into string ptr.
* ISO 639 is the relevant source here;
* see http://www.w3.org/WAI/ER/IG/ert/iso639.html
* for details */
void sqLocGetLanguageInto(char * str);
/***************** Currency ********************/
/* return true if the currency symbol is to be placed in front of the currency
* amount */
sqInt sqLocCurrencyNotation(void);
/* return the length in chars of the curency symbol string */
sqInt sqLocCurrencySymbolSize(void);
/* write the currency symbol into the string ptr */
void sqLocGetCurrencySymbolInto(char * str);
/***************** Numbers and measurements **************/
/* return true if the metric measurements system is to be used, false otherwise
* (USA is about it) */
sqInt sqLocMeasurementMetric(void);
/* write the 1 char used for digit grouping into string ptr.
* Usually this is . or , as in 1,000,000 */
void sqLocGetDigitGroupingSymbolInto(char * str);
/* write the 1 char used for decimal separation into string ptr.
* Usually this is . or , */
void sqLocGetDecimalSymbolInto(char * str);
/****************** time and date *********************/
/* return in minutes the offset between thisVM and UTC. */
sqInt sqLocGetVMOffsetToUTC(void);
/* return in minutes the offset between the currenct timezone and UTC */
sqInt sqLocGetTimezoneOffset(void);
/* return true if DST is in use, false otherwise */
sqInt sqLocDaylightSavings(void);
/* return the size in chars of the long date format string */
sqInt sqLocLongDateFormatSize(void);
/*Write the string describing the long date formatting into string ptr.
* Format is made up of
* d day, m month, y year,
* double symbol is null padded, single not padded (m=6, mm=06)
* dddd weekday
* mmmm month name */
void sqLocGetLongDateFormatInto(char * str);
/* return the size in chars of the short date format string */
sqInt sqLocShortDateFormatSize();
/*Write the string describing the short date formatting into string ptr.
* Format is made up of
* d day, m month, y year,
* double symbol is null padded, single not padded (m=6, mm=06)
* dddd weekday
* mmmm month name */
void sqLocGetShortDateFormatInto(char * str);
/* return the size in chars of the time format string */
sqInt sqLocTimeFormatSize(void);
/* write the string describing the time formatting into string ptr.
* Format is made up of
* h hour (h 12, H 24), m minute, s seconds, x (am/pm String)
* double symbol is null padded, single not padded (h=6, hh=06) */
void sqLocGetTimeFormatInto(char * str);