summaryrefslogtreecommitdiff
path: root/src/GF/Text/Hebrew.hs
blob: ebcc078e3680ce43a208c37317af748bc88729bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Hebrew where

mkHebrew :: String -> String
mkHebrew = reverse . unwords . (map mkHebrewWord) . words
--- reverse : assumes everything's on same line

type HebrewChar = Char

mkHebrewWord :: String -> [HebrewChar]
mkHebrewWord = map mkHebrewChar

mkHebrewChar c = case lookup c cc of Just c' -> c' ; _ -> c 
 where 
   cc = zip allHebrewCodes allHebrew

allHebrewCodes = "-abgdhwzHTyKklMmNnSoPpCcqrst"

allHebrew :: String
allHebrew = (map toEnum (0x05be : [0x05d0 .. 0x05ea]))