]>
Commit | Line | Data |
---|---|---|
dc61d398 KZ |
1 | /* |
2 | * This is callback solution for systems without nl_langinfo(), this function | |
9e930041 | 3 | * returns hardcoded and on locale setting indepndent value. |
dc61d398 KZ |
4 | * |
5 | * See langinfo.h man page for more details. | |
6 | * | |
8fb94518 KZ |
7 | * No copyright is claimed. This code is in the public domain; do with |
8 | * it what you wish. | |
9 | * | |
dc61d398 KZ |
10 | * Copyright (C) 2010 Karel Zak <kzak@redhat.com> |
11 | */ | |
12 | #include "nls.h" | |
13 | ||
14 | char *langinfo_fallback(nl_item item) | |
15 | { | |
16 | switch (item) { | |
17 | case CODESET: | |
18 | return "ISO-8859-1"; | |
19 | case THOUSEP: | |
20 | return ","; | |
21 | case D_T_FMT: | |
22 | case ERA_D_T_FMT: | |
23 | return "%a %b %e %H:%M:%S %Y"; | |
24 | case D_FMT: | |
25 | case ERA_D_FMT: | |
26 | return "%m/%d/%y"; | |
27 | case T_FMT: | |
28 | case ERA_T_FMT: | |
29 | return "%H:%M:%S"; | |
30 | case T_FMT_AMPM: | |
31 | return "%I:%M:%S %p"; | |
32 | case AM_STR: | |
33 | return "AM"; | |
34 | case PM_STR: | |
35 | return "PM"; | |
36 | case DAY_1: | |
37 | return "Sunday"; | |
38 | case DAY_2: | |
39 | return "Monday"; | |
40 | case DAY_3: | |
41 | return "Tuesday"; | |
42 | case DAY_4: | |
43 | return "Wednesday"; | |
44 | case DAY_5: | |
45 | return "Thursday"; | |
46 | case DAY_6: | |
47 | return "Friday"; | |
48 | case DAY_7: | |
49 | return "Saturday"; | |
50 | case ABDAY_1: | |
51 | return "Sun"; | |
52 | case ABDAY_2: | |
53 | return "Mon"; | |
54 | case ABDAY_3: | |
55 | return "Tue"; | |
56 | case ABDAY_4: | |
57 | return "Wed"; | |
58 | case ABDAY_5: | |
59 | return "Thu"; | |
60 | case ABDAY_6: | |
61 | return "Fri"; | |
62 | case ABDAY_7: | |
63 | return "Sat"; | |
64 | case MON_1: | |
65 | return "January"; | |
66 | case MON_2: | |
67 | return "February"; | |
68 | case MON_3: | |
69 | return "March"; | |
70 | case MON_4: | |
71 | return "April"; | |
72 | case MON_5: | |
73 | return "May"; | |
74 | case MON_6: | |
75 | return "June"; | |
76 | case MON_7: | |
77 | return "July"; | |
78 | case MON_8: | |
79 | return "August"; | |
80 | case MON_9: | |
81 | return "September"; | |
82 | case MON_10: | |
83 | return "October"; | |
84 | case MON_11: | |
85 | return "November"; | |
86 | case MON_12: | |
87 | return "December"; | |
88 | case ABMON_1: | |
89 | return "Jan"; | |
90 | case ABMON_2: | |
91 | return "Feb"; | |
92 | case ABMON_3: | |
93 | return "Mar"; | |
94 | case ABMON_4: | |
95 | return "Apr"; | |
96 | case ABMON_5: | |
97 | return "May"; | |
98 | case ABMON_6: | |
99 | return "Jun"; | |
100 | case ABMON_7: | |
101 | return "Jul"; | |
102 | case ABMON_8: | |
103 | return "Aug"; | |
104 | case ABMON_9: | |
105 | return "Sep"; | |
106 | case ABMON_10: | |
107 | return "Oct"; | |
108 | case ABMON_11: | |
109 | return "Nov"; | |
110 | case ABMON_12: | |
111 | return "Dec"; | |
112 | case ALT_DIGITS: | |
113 | return "\0\0\0\0\0\0\0\0\0\0"; | |
114 | case CRNCYSTR: | |
115 | return "-"; | |
116 | case YESEXPR: | |
117 | return "^[yY]"; | |
118 | case NOEXPR: | |
119 | return "^[nN]"; | |
120 | default: | |
121 | return ""; | |
122 | } | |
123 | } | |
124 |