bcp47-0.1.0.0: Language tags as specified by BCP 47

Safe HaskellNone
LanguageHaskell2010

Data.BCP47.Internal.Language

Synopsis

Documentation

languageFromText :: Text -> Either Text ISO639_1 Source #

Parse a language subtag from Text

languageP :: Parsec Void Text ISO639_1 Source #

BCP-47 language parser

This only implements the ISO 639 portion of the grammar.

@ language = 2*3ALPHA ; shortest ISO 639 code ["-" extlang] ; sometimes followed by ; extended language subtags / 4ALPHA ; or reserved for future use / 5*8ALPHA ; or registered language subtag @