The following are locale constants.
1 | Gregorian (as in United States) |
2 | Gregorian (English strings always) |
3 | Era: Year of the Emperor (Japan) |
4 | Era: Year of Taiwan Region |
5 | Tangun Era (Korea) |
6 | Hijri (Arabic lunar) |
7 | Thai |
8 | Hebrew (Lunar) |
9 | Gregorian Middle East French calendar |
10 | Gregorian Arabic calendar |
11 | Gregorian Transliterated English calendar |
12 | Gregorian Transliterated French calendar |
0 | Abbreviated 2-digit century |
1 | Full 4-digit century |
0 | Prefix, no separation |
1 | Suffix, no separation |
2 | Prefix, 1-character separation |
3 | Suffix, 1-character separation |
0 | Month-Day-Year |
1 | Day-Month-Year |
2 | Year-Month-Day |
0 | No leading zeros for days |
1 | Leading zeros for days |
0 | Context—the national shape depends on the previous text in the same output. |
1 | None/Arabic—gives full Unicode compatibility. |
2 | Native—national shapes determined by LOCALE_SNATIVEDIGITS. |
0 | LOCALE_SDAYNAME1 |
1 | LOCALE_SDAYNAME2 |
2 | LOCALE_SDAYNAME3 |
3 | LOCALE_SDAYNAME4 |
4 | LOCALE_SDAYNAME5 |
5 | LOCALE_SDAYNAME6 |
6 | LOCALE_SDAYNAME7 |
0 | Week containing 1/1 is the first week of that year. |
1 | First full week following 1/1 is the first week of that year. |
2 | First week containing at least four days is the first week of that year. |
0 | Month-Day-Year |
1 | Day-Month-Year |
2 | Year-Month-Day |
0 | No leading zeros |
1 | Leading zeros |
0 | No leading zeros for months |
1 | Leading zeros for months |
0 | ($1.1) |
1 | –$1.1 |
2 | $–1.1 |
3 | $1.1– |
4 | (1.1$) |
5 | –1.1$ |
6 | 1.1–$ |
7 | 1.1$– |
8 | –1.1 $ (space before $) |
9 | –$ 1.1 (space after $) |
10 | 1.1 $– (space before $) |
11 | $ 1.1– (space after $) |
12 | $ –1.1 (space after $) |
13 | 1.1– $ (space before $) |
14 | ($ 1.1) (space after $) |
15 | (1.1 $) (space before $) |
0 | (1.1) |
1 | -1.1 |
2 | - 1.1 |
3 | 1.1- |
4 | 1.1 - |
0 | No additional types valid |
1 | Gregorian (as in United States) |
2 | Gregorian (English strings always) |
3 | Era: Year of the Emperor (Japan) |
4 | Era: Year of Taiwan Region |
5 | Tangun Era (Korea) |
6 | Hijri (Arabic lunar) |
7 | Thai |
8 | Hebrew (Lunar) |
9 | Gregorian Middle East French calendar |
10 | Gregorian Arabic calendar |
11 | Gregorian Transliterated English calendar |
12 | Gregorian Transliterated French calendar |
0 | US Letter |
1 | A4 |
2 | Legal |
0 | Parentheses surround the amount and the monetary symbol. |
1 | The sign string precedes the amount and the monetary symbol. |
2 | The sign string succeeds the amount and the monetary symbol. |
3 | The sign string immediately precedes the monetary symbol. |
4 | The sign string immediately succeeds the monetary symbol. |
0 | AM / PM 12-hour format |
1 | 24-hour format |
0 | Use as suffix. |
1 | Use as prefix. |
0 | Use with 12-hour clock. |
1 | Use with 24-hour clock. |
2 | Use with both 12-hour and 24-hour clocks. |
3 | Never use. |
0 | No leading zeros for hours |
1 | Leading zeros for hours |
Many of the locale types previously listed are closely related, such that changing one affects the value of the others. The following table shows the relationships between these types:
Constant | Affects |
---|---|
LOCALE_ICURRENCY | LOCALE_IPOSSEPBYSPACE, LOCALE_IPOSSYMPRECEDES |
LOCALE_INEGCURR | LOCALE_INEGSEPBYSPACE, LOCALE_INEGSYMPRECEDES, LOCALE_INEGSIGNPOSN, LOCALE_IPOSSIGNPOSN |
LOCALE_SSHORTDATE | LOCALE_SDATE, LOCALE_IDATE |
LOCALE_SLONGDATE | LOCALE_ILDATE |
LOCALE_STIMEFORMAT | LOCALE_STIME, LOCALE_ITIME, LOCALE_ITLZERO |