citeproc-0.8.1: Generates citations and bibliography from CSL styles.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Citeproc.Locale

Synopsis

Documentation

parseLocale :: Text -> Either CiteprocError Locale Source #

Parse a CSL locale definition (XML). For information about the format, see https://docs.citationstyles.org/en/stable/translating-locale-files.html.

getLocale :: Lang -> Either CiteprocError Locale Source #

Retrieves the locale defined for the specified language. Implements the locale fallback algorithm described in the CSL 1.0.1 spec.

getPrimaryDialect :: Lang -> Maybe Lang Source #

Retrieves the "primary dialect" corresponding to a language, e.g. "lt-LT" for "lt".