From 0fe906ae7453aa684e998bbcc7a78b62d84f0206 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sun, 6 Apr 2014 22:55:16 +0200 Subject: Show resume and projects from a configuration file --- src/Model/Translated.hs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/Model/Translated.hs (limited to 'src/Model/Translated.hs') diff --git a/src/Model/Translated.hs b/src/Model/Translated.hs new file mode 100644 index 0000000..b92ae39 --- /dev/null +++ b/src/Model/Translated.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE DeriveGeneric #-} + +module Model.Translated where + +import GHC.Generics +import Data.Yaml + +import Model.Translation.Language + +data Translated = Translated + { english :: String + , french :: String + } deriving (Show, Read, Eq, Generic) + +instance FromJSON Translated + +getTranslation :: Language -> Translated -> String +getTranslation English translated = english translated +getTranslation French translated = french translated -- cgit v1.2.3