úÎ&ß#¾     portable provisionaleugene.grigoriev@gmail.com! !"#$%&'()*+,-./01portable experimentaleugene.grigoriev@gmail.comThe Localization structure. <The Internationalization monad allows the use of IO through 2. Localization mode.  & will throw an exception if unable to  translate whereas   will just return the original  String.    is used by . %The top level localization function.  import Text.I18n.Po ) import qualified System.IO.UTF8 as Utf8   main = do ( (l10n,errors) <- getL10n "dir/to/po" $ localize l10n (Locale "en") impl 'Structure containing localization data Locale to use Inernationalized action Localized action ;The top level localization function with a mode parameter. 6 main2 = localize' (Text.I18n.Po.getL10n "dir/to/po")  L10nMust ! (Locale "en")  impl 'Structure containing localization data Localization mode Locale to use Inernationalized action Localized action "The heart of I18n monad. Based on Text.Printf.printf.  impl = do % hello <- gettext "Hello, %s!" , liftIO (Utf8.putStrLn (hello "Joe"))  Sets a local  " for an internationalized action. B If there is no translation, then no context version is tried. ( impl2 = withContext (Just "test") impl Context to use Internationalized action New internationalized action  Sets a local " for an internationalized action. ( impl3 = withLocale (Locale "ru") impl2 Locale to use Internationalized action New internationalized action. I Note: while this action is localy localized already, it is to be a part & of another internationalized action. 0 Therefore the final type is internationalized. 3     portable experimentaleugene.grigoriev@gmail.com45Builds  structure by parsing  .po  files contained in a given  directory.  structure is to be passed to  function.  $ structure is used internaly by the   monad. Directory containing PO files. Localization structure  and a list of parse errors. 6789:;2<   =      !"#$%&'()*+,-./01234567889:;<45=45>45?@i18n-0.2Text.I18n.Printf Text.I18n Text.I18n.PoIsChar PrintfArg HPrintfType PrintfTypesprprintfhPrintfuprintfL10nI18nContextL10nModeL10nMayL10nMustLocaleMsgstrMsgidlocalize localize'gettext withContext withLocalegetL10nUPrintfUDoubleUFloatUIntegerUStringUChartoCharfromChar toUPrintfhspruIntegerfmtfmtifmtutointtostritosbstoigetSpecsdfmt'dfmtperrorfmterrargerrbaderr mtl-1.1.1.0Control.Monad.TransliftIO localizeMsgidMsgDec processPosmkMsgspoFilesparsePolift MonadTransMonadIO