aboutsummaryrefslogtreecommitdiffstats
path: root/src/I18n.hs
diff options
context:
space:
mode:
authorTeddy Wing2017-08-19 02:10:38 +0200
committerTeddy Wing2017-08-19 02:10:38 +0200
commit6cd279630923cdcd053e373b56b8bc0ad85a9b08 (patch)
tree17efcc7e58d763608a0e7ba19ed75e170d328bdd /src/I18n.hs
parent3857fca015a802d09a4e169c56895831fef11db8 (diff)
downloadsorbot-6cd279630923cdcd053e373b56b8bc0ad85a9b08.tar.bz2
Set up i18n
en.msg: * Remove comment lines because apparently comments aren't allowed by the parser * Change data type to `T.Text` to match the import from the `I18n` module GitHubCommit.hs: Import the `I18n` module because we'll be testing it in context in a bit, but for now just want to get the module code to compile. I18n.hs: Follow the example on http://www.yesodweb.com/book/internationalization to make a function for proper internationalisation.
Diffstat (limited to 'src/I18n.hs')
-rw-r--r--src/I18n.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/I18n.hs b/src/I18n.hs
new file mode 100644
index 0000000..9b9f870
--- /dev/null
+++ b/src/I18n.hs
@@ -0,0 +1,13 @@
+{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE TemplateHaskell #-}
+
+module I18n where
+
+import qualified Data.Text as T
+
+import Text.Shakespeare.I18N (mkMessage, renderMessage)
+
+data Bot = Bot
+
+mkMessage "Bot" "messages" "en"