pandoc-3.6.3: Conversion between markup formats

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 | None
Language | Haskell2010

Text.Pandoc.Translations

Description

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

module Text.Pandoc.Translations.Types

readTranslations :: Text -> Either Text Translations #

Parse YAML translations.

getTranslations :: PandocMonad m => m Translations #

Load term map.

setTranslations :: PandocMonad m => Lang -> m () #

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 #

Get a translation from the current term map. Issue a warning if the term is not defined.