Copyright | Copyright (C) 2017-2024 John MacFarlane |
---|---|
License | GNU GPL, version 2 or above |
Maintainer | John MacFarlane <jgm@berkeley.edu> |
Stability | alpha |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Functions for getting localized translations of terms.
Synopsis
- module Text.Pandoc.Translations.Types
- readTranslations :: Text -> Either Text Translations
- getTranslations :: PandocMonad m => m Translations
- setTranslations :: PandocMonad m => Lang -> m ()
- translateTerm :: PandocMonad m => Term -> m Text
Documentation
readTranslations :: Text -> Either Text Translations Source #
Parse YAML translations.
getTranslations :: PandocMonad m => m Translations Source #
Load term map.
setTranslations :: PandocMonad m => Lang -> m () Source #
Select the language to use with translateTerm
.
Note that this does not read a translation file;
that is only done the first time translateTerm
is
used.
translateTerm :: PandocMonad m => Term -> m Text Source #
Get a translation from the current term map. Issue a warning if the term is not defined.