Citeproc.Locale

citeproc-0.9.0.1: Generates citations and bibliography from CSL styles.

Safe Haskell | None
Language | Haskell2010

Citeproc.Locale

Synopsis

- parseLocale :: Text -> Either CiteprocError Locale
- getLocale :: Lang -> Either CiteprocError Locale
- getPrimaryDialect :: Lang -> Maybe Lang
- lookupQuotes :: Locale -> ((Text, Text), (Text, Text))

# Documentation

parseLocale :: Text -> Either CiteprocError Locale #

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 #

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 #

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

lookupQuotes :: Locale -> ((Text, Text), (Text, Text)) #