Safe Haskell | None |
---|---|
Language | Haskell98 |
- acceptLanguage :: Happstack m => m [(Text, Maybe Double)]
- bestLanguage :: [(Text, Maybe Double)] -> [Text]
Documentation
acceptLanguage :: Happstack m => m [(Text, Maybe Double)] Source
parse the 'Accept-Language' header, or [] if not found.
bestLanguage :: [(Text, Maybe Double)] -> [Text] Source
deconstruct the acceptLanguage
results a return a list of
languages sorted by preference in descending order.
Note: this implementation does not conform to RFC4647
Among other things, it does not handle wildcards. A proper implementation needs to take a list of available languages.