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
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
122
  
123
  
124
  
125
  
126
  
127
  
128
  
129
  
130
  
131
  
132
  
133
  
134
  
135
  
136
  
137
  
138
  
139
  
140
  
141
  
142
  
143
  
144
  
145
  
146
  
147
  
148
  
149
  
150
  
151
  
152
  
153
  
154
  
155
  
156
  
157
  
158
  
159
  
160
  
161
  
#charset iso-8859-2 
constant required_charset = "iso-8859-2"; 
 
// Czech language support for Roxen 
// 
// Author: Jan Petrous 16.10.1997 
// Based on Slovenian language module by Iztok Umek 
// E-mail: hop@unibase.cz 
// 
// You can do enything you want this code. 
// Please consult me before modifying czech.pike. 
// 
// 13.05.1998 hop     corrected one a little bug 
//                    All texts are now in ISO 8859-2 
// 16.11.1998 hop     corrected name of months and days 
//                            (First letter must be lower case) 
 
inherit "abstract.pike"; 
 
constant cvs_version = "$Id$"; 
constant _id = ({ "cs", "czech", "èesky" }); 
constant _aliases = ({ "cs", "cz", "cze", "ces", "czech" }); 
 
constant languages=([ 
  "cat":"katalánsky", 
  "ces":"èesky", 
  "nld":"holandsky", 
  "fin":"finsky", 
  "fra":"francouzsky", 
  "deu":"nìmecky", 
  "eng":"anglicky", 
  "spa":"¹panìlsky", 
  "hrv":"chorvatsky", 
  "hun":"maïarsky", 
  "ita":"italsky", 
  "jpn":"japonsky", 
  "mri":"maorsky", 
  "nor":"norsky", 
  "pol":"polsky", 
  "por":"portugalsky", 
  "rus":"rusky", 
  "sin":"slovinsky", 
  "slk":"slovensky", 
  "srn":"srbsky", 
  "swe":"¹védsky" 
]); 
 
 
constant months = ({ 
  "ledna", "února", "bøezna", "dubna", "kvìtna", 
  "èervna", "èervence", "srpna", "záøí", "øíjna", 
  "listopadu", "prosince" }); 
 
constant days = ({ 
  "nedìle","pondìlí","úterý","støeda", 
  "ètvrtek","pátek","sobota" }); 
 
constant implode_conjunction = "a"; 
 
string ordered(int i) 
{ 
  switch(i) 
  { 
   case 0: 
    return ("buggy"); 
   default: 
      return (i+"."); 
  } 
} 
 
string date(int timestamp, mapping|void m) 
{ 
  mapping t1=localtime(timestamp); 
  mapping t2=localtime(time(0)); 
 
  if(!m) m=([]); 
 
  if(!(m["full"] || m["date"] || m["time"])) 
  { 
    if(t1["yday"] == t2["yday"] && t1["year"] == t2["year"]) 
      return ("dnes, "+ ctime(timestamp)[11..15]); 
 
    if(t1["yday"]+1 == t2["yday"] && t1["year"] == t2["year"]) 
      return ("vèera, "+ ctime(timestamp)[11..15]); 
 
    if((t1["yday"]-1) == t2["yday"] && t1["year"] == t2["year"]) 
      return ("zítra, "+ ctime(timestamp)[11..15]); 
 
    if(t1["year"] != t2["year"]) 
      return (month(t1["mon"]+1) + " " + (t1["year"]+1900)); 
    return (ordered(t1["mday"]) + " " + month(t1["mon"]+1)); 
  } 
  if(m["full"]) 
    return (ctime(timestamp)[11..15]+", "+ 
           ordered(t1["mday"]) + " " + 
           month(t1["mon"]+1) + " " + 
           (t1["year"]+1900)); 
  if(m["date"]) 
    return (ordered(t1["mday"]) + " " + month(t1["mon"]+1) + " " + 
       (t1["year"]+1900)); 
  if(m["time"]) 
    return (ctime(timestamp)[11..15]); 
} 
 
 
string number(int num) 
{ 
  if(num<0) 
    return ("minus "+number(-num)); 
  switch(num) 
  { 
   case 0:  return (""); 
   case 1:  return ("jedna"); 
   case 2:  return ("dvì"); 
   case 3:  return ("tøi"); 
   case 4:  return ("ètyøi"); 
   case 5:  return ("pìt"); 
   case 6:  return ("±est"); 
   case 7:  return ("sedm"); 
   case 8:  return ("osm"); 
   case 9:  return ("devìt"); 
   case 10: return ("deset"); 
   case 11: return ("jedenáct"); 
   case 12: return ("dvanáct"); 
   case 13: case 16..18: return (number(num-10)+"náct"); 
   case 14: return ("ètrnáct"); 
   case 15: return ("patnást"); 
   case 19: return ("devatenáct"); 
   case 20: return ("dvacet"); 
   case 30: return ("tøicet"); 
   case 40: return ("ètyøicet"); 
   case 50: return ("padesát"); 
   case 60: return ("±edesát"); 
   case 70: return ("sedmdesát"); 
   case 80: return ("osmdesát"); 
   case 90: return ("devadesát"); 
   case 21..29: case 31..39: 
   case 51..59: case 61..69: case 71..79: 
   case 81..89: case 91..99: case 41..49: 
     return (number((num/10)*10)+number(num%10)); 
   case 100..199: return ("sto"+number(num%100)); 
   case 200..299: return ("dvìstì "+number(num%100)); 
   case 300..499: return (number(num/100)+"sta "+number(num%100)); 
   case 500..999: return (number(num/100)+"set "+number(num%100)); 
   case 1000..1999: return ("tisíc "+number(num%1000)); 
   case 2000..2999: return ("dva tisíce "+number(num%1000)); 
   case 3000..999999: return (number(num/1000)+" tisíc "+number(num%1000)); 
   case 1000000..999999999: 
     return (number(num/1000000)+" milion "+number(num%1000000)); 
   default: 
    return ("hodnì"); 
  } 
} 
 
 
protected void create() 
{ 
  roxen.dump( __FILE__ ); 
}