language package:http-media

Suitable for HTTP language-ranges as defined in RFC4647. Specifically:
language-range = (1*8ALPHA *("-" 1*8alphanum)) / "*"
Defines the Language accept header with an Accept instance for use in language negotiation.
A specialisation of mapAccept that only takes Language as its input, to avoid ambiguous-type errors when using string literal overloading.
getHeader >>= maybe render406Error renderResource . mapAcceptLanguage
[ ("en-gb", inBritishEnglish)
, ("fr",    inFrench)
]
A specialisation of mapContent that only takes Language as its input, to avoid ambiguous-type errors when using string literal overloading.
getContentLanguage >>=
maybe send415Error readRequestBodyWith . mapContentLanguage
[ ("en-gb", parseBritishEnglish)
, ("fr",    parseFrench)
]