summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-06-25 17:42:19 +0000
committeraarne <aarne@cs.chalmers.se>2008-06-25 17:42:19 +0000
commit5971c110e9463a97b3baa6d420982d36488adee0 (patch)
treedb8ea93fa720a8cecf07cfea77c3f1153c23a63c /src
parent67b80bcd40c7e41a312de845b77506d95b2c7fe6 (diff)
added a slot for Urdu in Text.Transliterations
Diffstat (limited to 'src')
-rw-r--r--src/GF/Text/Transliterations.hs14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/GF/Text/Transliterations.hs b/src/GF/Text/Transliterations.hs
index 30c098df8..57237a1cf 100644
--- a/src/GF/Text/Transliterations.hs
+++ b/src/GF/Text/Transliterations.hs
@@ -27,6 +27,7 @@ transliteration :: String -> Maybe Transliteration
transliteration s = case s of
"devanagari" -> Just transDevanagari
"thai" -> Just transThai
+ "urdu" -> Just transUrdu
_ -> Nothing
characterTable :: Transliteration -> String
@@ -85,13 +86,20 @@ transThai = mkTransliteration allTrans allCodes where
allCodes = [0x0e00 .. 0x0e7f]
transDevanagari :: Transliteration
-transDevanagari = (mkTransliteration allTrans allCodes){invisible_chars = ["a"]} where
- allTrans = words $
+transDevanagari =
+ (mkTransliteration allTransUrduHindi allCodes){invisible_chars = ["a"]} where
+ allCodes = [0x0901 .. 0x094c]
+
+allTransUrduHindi = words $
"M N - - " ++
"a- A- i- I- u- U- R- - - - e- E- - - o- O- " ++
"k K g G N: c C j J n: t. T. d. D. n. t " ++
"T d D n - p P b B m y r - l - - v " ++
"S s. s h - - r. - A i I u U R - - " ++
"- e E o O "
- allCodes = [0x0901 .. 0x094c]
+
+transUrdu :: Transliteration
+transUrdu =
+ (mkTransliteration allTransUrduHindi allCodes){invisible_chars = ["a"]} where
+ allCodes = [0x0901 .. 0x094c]