Skip to content

kirchner/bcp47

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BCP 47 Build Status

This library lets you parse language tags according to the specifications in BCP 47: strings like "zh-cmn-Hans-CN", "en-US", "ja-JP-u-ca-japanese", "x-whatever", ... . The first one, for example, would be turned into

languageTag =
    LanguageTag
        { language =
            { shortestIso639Code = "zh"
            , extension =
                Just
                    { selectedIso639Code = "cmn"
                    , reserved = []
                    }
            }
        , script = Just "Hans"
        , region = Just (ISO3166_1 "CN")
        , variants = []
        , extensions = []
        , privateUse = []
        }

You can also turn these data back into canonicalized strings.

About

parse language tags according to bcp 47 in elm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages