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