# Language Tag (BCP 47) package

**URL:** <https://discourse.elm-lang.org/t/language-tag-bcp-47-package/6789>\
**Category:** Show and Tell\
**Created:** [January 20, 2021, 10:41pm UTC](https://discourse.elm-lang.org/t/language-tag-bcp-47-package/6789 "2021-01-20T22:41:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dillonkearns](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/dillonkearns/32/1587_2.png) [@dillonkearns](https://discourse.elm-lang.org/u/dillonkearns)\
**Post date:** [January 20, 2021, 10:41pm UTC](https://discourse.elm-lang.org/t/language-tag-bcp-47-package/6789/1 "2021-01-20T22:41:27Z")

</div>

I [created a simple package aimed at helping you build up language tags](https://package.elm-lang.org/packages/dillonkearns/elm-bcp47-language-tag/latest/). The main use case I built it for was adding the `<html lang="en-US">` type tags for an `elm-pages` app. It’s focused solely on generating the BCP 47 code (doesn’t include any metadata like language name, country name, etc.). I also built it with dead-code elimination in mind, so while it includes a lot of definitions, with Elm’s dead-code elimination it will only include the codes you explicitly reference in the code you ship.

You can see some other places that BCP 47 language tags are used in the readme. Hope some people find some use from it!

> **[dillonkearns/elm-bcp47-language-tag](https://github.com/dillonkearns/elm-bcp47-language-tag/)**
>
> BCP47 language tags, ISO 639-1 language codes, and ISO 3166-1 country codes.

---

<div class="post-metadata">

**Author:** ![ni-ko-o-kin](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/ni-ko-o-kin/32/2693_2.png) [@ni-ko-o-kin](https://discourse.elm-lang.org/u/ni-ko-o-kin)\
**Post date:** [January 21, 2021, 10:09am UTC](https://discourse.elm-lang.org/t/language-tag-bcp-47-package/6789/2 "2021-01-21T10:09:06Z")

</div>

Very useful! Thank you very much! Just at the right time 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [January 31, 2021, 10:09am UTC](https://discourse.elm-lang.org/t/language-tag-bcp-47-package/6789/3 "2021-01-31T10:09:12Z")

</div>

Closed on January 31, 2021, 10:09am UTC

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
