bcp47: Language tags as specified by BCP 47

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Language tags for use in cases where it is desirable to indicate the language used in an information object.

- https://tools.ietf.org/html/bcp47

This package exposes a language tag data type BCP47 and a Trie data structure for collecting and querying information that varies based on language tag.

import Data.BCP47 (en, enGB, sw)
import Data.BCP47.Trie (Trie, fromList, lookup)

color :: Trie Text
color = fromList [(en, "color"), (sw, "rangi")]

main = do
  print $ match en color -- Just "color"
  print $ match enGB color -- Nothing
  print $ lookup enGB color -- Just "color"

[Skip to ReadMe]

Properties

Versions0.1.0.0, 0.1.0.0
Change logChangeLog.md
Dependenciesaeson (>=1.4.4.0 && <1.5), base (>=4.7 && <5), containers (>=0.6.0.1 && <0.7), country (>=0.1.6 && <0.2), generic-arbitrary (>=0.1.0 && <0.2), iso639 (>=0.1.0.3 && <0.2), megaparsec (>=7.0.5 && <7.1), QuickCheck (>=2.13.2 && <2.14), text (>=1.2.3.1 && <1.3) [details]
LicenseMIT
Copyright2019 Freckle Education
AuthorEvan Rutledge Borden
Maintainerengineering@freckle.com
CategoryData, Data Structures
Home pagehttps://github.com/freckle/bcp47#readme
Bug trackerhttps://github.com/freckle/bcp47/issues
Source repositoryhead: git clone https://github.com/freckle/bcp47
UploadedMon Aug 26 15:09:07 UTC 2019 by dukerutledge

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for bcp47-0.1.0.0

[back to package description]

BCP-47

CircleCI

Language tags for use in cases where it is desirable to indicate the language used in an information object.