aboutsummaryrefslogtreecommitdiffstats
path: root/src/CliOptions.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CliOptions.hs')
-rw-r--r--src/CliOptions.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/CliOptions.hs b/src/CliOptions.hs
index 9d8baf6..f29704a 100644
--- a/src/CliOptions.hs
+++ b/src/CliOptions.hs
@@ -1,6 +1,8 @@
module CliOptions
( Options(..)
+ , lang
+
, parseOptions
) where
@@ -43,3 +45,9 @@ parseOptions = do
( fullDesc
<> progDesc "A chat bot with a plugin interface that does a bunch of \
\random things." )
+
+-- | A convenience function to get the configured locale.
+lang :: IO Locale
+lang = do
+ opts <- parseOptions
+ return $ language opts