blob: 01852cbdb0a961c894bd0c14b365b0afc08e4087 (
plain) (
blame)
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
|
{-# LANGUAGE ScopedTypeVariables, DeriveDataTypeable #-}
module Locales where
import Data.Data (Data, Typeable)
{- to add a language simply define its abbreviation and Show instance then
- translate the appropriate strings and add CouchDB views in Server.hs -}
data BlogLang = EN | DE deriving (Data, Typeable)
instance Show BlogLang where
show EN = "en"
show DE = "de"
version = ("2.2b" :: String)
allLang = [EN, DE]
if' :: Bool -> a -> a -> a
if' True x _ = x
if' False _ y = y
blogTitle :: BlogLang -> String -> String
blogTitle DE s = "Tazjins Blog" ++ s
blogTitle EN s = "Tazjin's Blog" ++ s
-- index site headline
topText DE = "Aktuelle Einträge"
topText EN = "Latest entries"
getMonth :: BlogLang -> Int -> Int -> String
getMonth l y m = monthName l m ++ show y
where
monthName :: BlogLang -> Int -> String
monthName DE m = case m of
1 -> "Januar "
2 -> "Februar "
3 -> "März "
4 -> "April "
5 -> "Mai "
6 -> "Juni "
7 -> "Juli "
8 -> "August "
9 -> "September "
10 -> "Oktober "
11 -> "November "
12 -> "Dezember "
monthName EN m = case m of
1 -> "January "
2 -> "February "
3 -> "March "
4 -> "April "
5 -> "May "
6 -> "June "
7 -> "July "
8 -> "August "
9 -> "September "
10 -> "October "
11 -> "November "
12 -> "December "
entireMonth DE = "Ganzer Monat"
entireMonth EN = "Entire month"
backText DE = "Früher"
backText EN = "Earlier"
nextText DE = "Später"
nextText EN = "Later"
-- contact information
contactText DE = "Wer mich kontaktieren will: "
contactText EN = "Get in touch with me: "
orString DE = " oder "
orString EN = " or "
-- footer
noticeText EN = "site notice"
noticeText DE = "Impressum"
-- comments
noComments DE = " Keine Kommentare"
noComments EN = " No comments yet"
cHead DE = "Kommentare:"
cHead EN = "Comments:"
cwHead DE = "Kommentieren:"
cwHead EN = "Comment:"
cTimeFormat DE = "[Am %d.%m.%y um %H:%M Uhr]"
cTimeFormat EN = "[On %D at %H:%M]"
-- right side text (this is inserted AS IS. Escape HTML!)
rightText DE = "English version <a href=\"en\">available here</a>"
rightText EN = "Deutsche Version <a href=\"de\">hier verfügbar</a>"
-- static information
repoURL = "https://bitbucket.org/tazjin/tazblog-haskell"
mailTo = "mailto:hej@tazj.in"
twitter = "http://twitter.com/#!/tazjin"
iMessage = "imessage:tazjin@me.com"
iMessage' = "sms:tazjin@me.com"
|