aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Citeproc/Util.hs
blob: 6d8e01bc9ccd0e154a49967f3c5b1a6041bf592e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
module Text.Pandoc.Citeproc.Util
 ( toIETF )
where
import Data.Text (Text)

toIETF :: Text -> Text
toIETF "english"         = "en-US" -- "en-EN" unavailable in CSL
toIETF "usenglish"       = "en-US"
toIETF "american"        = "en-US"
toIETF "british"         = "en-GB"
toIETF "ukenglish"       = "en-GB"
toIETF "canadian"        = "en-US" -- "en-CA" unavailable in CSL
toIETF "australian"      = "en-GB" -- "en-AU" unavailable in CSL
toIETF "newzealand"      = "en-GB" -- "en-NZ" unavailable in CSL
toIETF "afrikaans"       = "af-ZA"
toIETF "arabic"          = "ar"
toIETF "basque"          = "eu"
toIETF "bulgarian"       = "bg-BG"
toIETF "catalan"         = "ca-AD"
toIETF "croatian"        = "hr-HR"
toIETF "czech"           = "cs-CZ"
toIETF "danish"          = "da-DK"
toIETF "dutch"           = "nl-NL"
toIETF "estonian"        = "et-EE"
toIETF "finnish"         = "fi-FI"
toIETF "canadien"        = "fr-CA"
toIETF "acadian"         = "fr-CA"
toIETF "french"          = "fr-FR"
toIETF "francais"        = "fr-FR"
toIETF "austrian"        = "de-AT"
toIETF "naustrian"       = "de-AT"
toIETF "german"          = "de-DE"
toIETF "germanb"         = "de-DE"
toIETF "ngerman"         = "de-DE"
toIETF "greek"           = "el-GR"
toIETF "polutonikogreek" = "el-GR"
toIETF "hebrew"          = "he-IL"
toIETF "hungarian"       = "hu-HU"
toIETF "icelandic"       = "is-IS"
toIETF "italian"         = "it-IT"
toIETF "japanese"        = "ja-JP"
toIETF "latvian"         = "lv-LV"
toIETF "lithuanian"      = "lt-LT"
toIETF "magyar"          = "hu-HU"
toIETF "mongolian"       = "mn-MN"
toIETF "norsk"           = "nb-NO"
toIETF "nynorsk"         = "nn-NO"
toIETF "farsi"           = "fa-IR"
toIETF "polish"          = "pl-PL"
toIETF "brazil"          = "pt-BR"
toIETF "brazilian"       = "pt-BR"
toIETF "portugues"       = "pt-PT"
toIETF "portuguese"      = "pt-PT"
toIETF "romanian"        = "ro-RO"
toIETF "russian"         = "ru-RU"
toIETF "serbian"         = "sr-RS"
toIETF "serbianc"        = "sr-RS"
toIETF "slovak"          = "sk-SK"
toIETF "slovene"         = "sl-SL"
toIETF "spanish"         = "es-ES"
toIETF "swedish"         = "sv-SE"
toIETF "thai"            = "th-TH"
toIETF "turkish"         = "tr-TR"
toIETF "ukrainian"       = "uk-UA"
toIETF "vietnamese"      = "vi-VN"
toIETF "latin"           = "la"
toIETF x                 = x