├── .editorconfig ├── .github └── workflows │ └── main.yml ├── .gitignore ├── .npmrc ├── .prettierignore ├── funding.yml ├── index.js ├── lib ├── index.js ├── min.json └── top.json ├── license ├── package.json ├── readme.md ├── script ├── build-data.js └── build-support.js ├── test.js └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | main: 3 | name: ${{matrix.node}} 4 | runs-on: ubuntu-latest 5 | steps: 6 | - uses: actions/checkout@v4 7 | - uses: actions/setup-node@v4 8 | with: 9 | node-version: ${{matrix.node}} 10 | - run: npm install 11 | - run: npm test 12 | - uses: codecov/codecov-action@v5 13 | strategy: 14 | matrix: 15 | node: 16 | - lts/hydrogen 17 | - node 18 | name: main 19 | on: 20 | - pull_request 21 | - push 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.d.ts 2 | *.log 3 | *.map 4 | *.tsbuildinfo 5 | .DS_Store 6 | coverage/ 7 | node_modules/ 8 | yarn.lock 9 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | ignore-scripts=true 2 | package-lock=false 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | *.md 2 | coverage/ 3 | -------------------------------------------------------------------------------- /funding.yml: -------------------------------------------------------------------------------- 1 | github: wooorm 2 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | export {min, top} from './lib/index.js' 2 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | import fs from 'node:fs/promises' 2 | import {fileURLToPath} from 'node:url' 3 | 4 | /** 5 | * Get top trigrams. 6 | * 7 | * @returns {Promise>>} 8 | * Top trigrams. 9 | */ 10 | export async function min() { 11 | return JSON.parse( 12 | await fs.readFile( 13 | fileURLToPath(new URL('min.json', import.meta.url)), 14 | 'utf8' 15 | ) 16 | ) 17 | } 18 | 19 | /** 20 | * Get top trigrams to occurrence counts. 21 | * 22 | * @returns {Promise>>} 23 | * Top trigrams to occurrence counts. 24 | */ 25 | export async function top() { 26 | return JSON.parse( 27 | await fs.readFile( 28 | fileURLToPath(new URL('top.json', import.meta.url)), 29 | 'utf8' 30 | ) 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) Titus Wormer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Titus Wormer (https://wooorm.com)", 3 | "bugs": "https://github.com/wooorm/trigrams/issues", 4 | "contributors": [ 5 | "Titus Wormer (https://wooorm.com)" 6 | ], 7 | "dependencies": {}, 8 | "description": "Trigram files for 500+ languages", 9 | "devDependencies": { 10 | "@types/mdast": "^4.0.0", 11 | "@types/node": "^22.0.0", 12 | "c8": "^10.0.0", 13 | "hast-util-from-html": "^2.0.0", 14 | "hast-util-select": "^6.0.0", 15 | "hast-util-to-string": "^3.0.0", 16 | "import-meta-resolve": "^4.0.0", 17 | "mdast-zone": "^6.0.0", 18 | "prettier": "^3.0.0", 19 | "remark-cli": "^12.0.0", 20 | "remark-preset-wooorm": "^11.0.0", 21 | "trigram-utils": "^2.0.0", 22 | "type-coverage": "^2.0.0", 23 | "typescript": "^5.0.0", 24 | "udhr": "^6.0.0", 25 | "xo": "^0.60.0" 26 | }, 27 | "exports": "./index.js", 28 | "files": [ 29 | "index.d.ts.map", 30 | "index.d.ts", 31 | "index.js", 32 | "lib/" 33 | ], 34 | "funding": { 35 | "type": "github", 36 | "url": "https://github.com/sponsors/wooorm" 37 | }, 38 | "keywords": [ 39 | "declaration", 40 | "detection", 41 | "guessing", 42 | "human", 43 | "language", 44 | "rights", 45 | "trigram", 46 | "udhr", 47 | "unicode", 48 | "universal" 49 | ], 50 | "license": "MIT", 51 | "name": "trigrams", 52 | "prettier": { 53 | "bracketSpacing": false, 54 | "semi": false, 55 | "singleQuote": true, 56 | "tabWidth": 2, 57 | "trailingComma": "none", 58 | "useTabs": false 59 | }, 60 | "remarkConfig": { 61 | "plugins": [ 62 | "remark-preset-wooorm", 63 | [ 64 | "remark-gfm", 65 | { 66 | "tablePipeAlign": false 67 | } 68 | ], 69 | [ 70 | "remark-lint-table-pipe-alignment", 71 | false 72 | ], 73 | "./script/build-support.js" 74 | ] 75 | }, 76 | "repository": "wooorm/trigrams", 77 | "scripts": { 78 | "build": "tsc --build --clean && tsc --build && type-coverage", 79 | "format": "remark --frail --output --quiet -- . && prettier --log-level warn --write -- . && xo --fix", 80 | "generate": "node --conditions development script/build-data.js && node --conditions development script/build-support.js", 81 | "test-api": "node --conditions development test.js", 82 | "test-coverage": "c8 --100 --reporter lcov -- npm run test-api", 83 | "test": "npm run generate && npm run build && npm run format && npm run test-coverage" 84 | }, 85 | "sideEffects": false, 86 | "typeCoverage": { 87 | "atLeast": 100, 88 | "strict": true 89 | }, 90 | "type": "module", 91 | "version": "6.0.0", 92 | "xo": { 93 | "prettier": true, 94 | "rules": { 95 | "unicorn/prefer-at": "off" 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # trigrams 2 | 3 | [![Build][badge-build-image]][badge-build-url] 4 | [![Coverage][badge-coverage-image]][badge-coverage-url] 5 | [![Downloads][badge-downloads-image]][badge-downloads-url] 6 | 7 | Trigrams for 500+ languages. 8 | 9 | ## Contents 10 | 11 | * [What is this?](#what-is-this) 12 | * [When should I use this?](#when-should-i-use-this) 13 | * [Install](#install) 14 | * [Use](#use) 15 | * [API](#api) 16 | * [`min()`](#min) 17 | * [`top()`](#top) 18 | * [Data](#data) 19 | * [Compatibility](#compatibility) 20 | * [Contribute](#contribute) 21 | * [Security](#security) 22 | * [License](#license) 23 | 24 | ## What is this? 25 | 26 | This package exposes all trigrams for natural languages. 27 | Based on the most translated copyright-free document on this planet: 28 | UDHR. 29 | 30 | ## When should I use this? 31 | 32 | When you are dealing with natural language detection. 33 | 34 | ## Install 35 | 36 | This package is [ESM only][github-gist-esm]. 37 | In Node.js 38 | (version 18+), 39 | install with [npm][npmjs-install]: 40 | 41 | ```sh 42 | npm install trigrams 43 | ``` 44 | 45 | In Deno with [`esm.sh`][esmsh]: 46 | 47 | ```js 48 | import {min, top} from 'https://esm.sh/trigrams@6' 49 | ``` 50 | 51 | In browsers with [`esm.sh`][esmsh]: 52 | 53 | ```html 54 | 57 | ``` 58 | 59 | ## Use 60 | 61 | ```js 62 | import {min, top} from 'trigrams' 63 | 64 | console.log((await min()).nld) 65 | console.log((await top()).pam) 66 | ``` 67 | 68 | Yields: 69 | 70 | ```js 71 | [ // 300 top trigrams. 72 | ' ar', 73 | 'eer', 74 | 'tij', 75 | // … 76 | 'de ', 77 | 'an ', 78 | 'en ' // Most common trigram. 79 | ] 80 | ``` 81 | 82 | ```js 83 | { // 300 top trigrams. 84 | 'isa': 6, 85 | 'upa': 6, 86 | 'i k': 6, 87 | // … 88 | 'ang': 273, 89 | 'ing': 282, 90 | 'ng ': 572 // Most common trigram with how often it was found. 91 | } 92 | ``` 93 | 94 | ## API 95 | 96 | This package exports the identifiers 97 | [`min`][api-min] and 98 | [`top`][api-top]. 99 | It exports no [TypeScript][] types. 100 | There is no default export. 101 | 102 | ### `min()` 103 | 104 | Get top trigrams. 105 | 106 | ###### Returns 107 | 108 | Returns a promise resolving to arrays containing the top 300 trigrams sorted 109 | from least occurring to most occurring 110 | (`Promise>>`). 111 | 112 | ### `top()` 113 | 114 | Get top trigrams to occurrence counts. 115 | 116 | ###### Returns 117 | 118 | Returns a promise resolving to an object mapping 119 | *[UDHR in Unicode][efele-udhr]* 120 | codes to objects mapping the top 300 trigrams to occurrence counts 121 | (`Promise>>`). 122 | 123 | ## Data 124 | 125 | The trigrams are based on the [unicode][efele-udhr] versions of the 126 | [universal declaration of human rights][ohchr-udhr]. 127 | 128 | The files are created from all paragraphs made available by 129 | [`wooorm/udhr`][github-wooorm-udhr] and do not include headings and such. 130 | 131 | Before creating trigrams, 132 | 133 | * the unicode characters from `\u0021` to `\u0040` (both including) are 134 | removed 135 | * one or more white space characters (`\s+`) are replaced with a single space 136 | * alphabetic characters are lower cased (`[A-Z]`) 137 | 138 | Additionally, 139 | the input is padded with two spaces on both sides. 140 | 141 | 142 | 143 | | Code | Name | 144 | | - | - | 145 | | `007` | [Sãotomense](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=1128) | 146 | | `008` | Crioulo, Upper Guinea (008) | 147 | | `009` | Mbundu (009) | 148 | | `010` | Tetun Dili | 149 | | `011` | Umbundu (011) | 150 | | `013` | [(Mijisa)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bz2) | 151 | | `014` | [(Maiunan)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ma1) | 152 | | `016` | [(Minjiang, spoken)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mi1_spok) | 153 | | `017` | [(Minjiang, written)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mi1_written) | 154 | | `020` | [Drung](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ty1) | 155 | | `021` | [(Muzzi)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mz1) | 156 | | `022` | [(Klau)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kl1) | 157 | | `025` | [(Bizisa)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=Bz1) | 158 | | `026` | [(Yeonbyeon)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ye1) | 159 | | `027` | [Gumuz](https://www.ohchr.org/en/human-rights/universal-declaration/translations/gumuz) | 160 | | `028` | [Kafa](https://www.ohchr.org/en/human-rights/universal-declaration/translations/kafi-noono) | 161 | | `029` | [Sidamo](https://www.ohchr.org/en/human-rights/universal-declaration/translations/sidaamu-afoo) | 162 | | `030` | [Kituba (2)](https://www.ohchr.org/en/node/104406) | 163 | | `032` | [South Azerbaijani](https://www.ohchr.org/en/node/104397) | 164 | | `041` | [Latvian (2)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lat) | 165 | | `042` | Spanish (resolution) | 166 | | `043` | [Zarma](https://www.ohchr.org/en/human-rights/universal-declaration/translations/zarma) | 167 | | `044` | [Mirandese](https://www.ohchr.org/en/human-rights/universal-declaration/translations/mirandes) | 168 | | `045` | [Maasai](https://www.ohchr.org/en/human-rights/universal-declaration/translations/maa) | 169 | | `046` | [Malay, Papuan](https://www.ohchr.org/en/human-rights/universal-declaration/translations/papuan) | 170 | | `047` | [Malay, Ambonese](https://www.ohchr.org/en/human-rights/universal-declaration/translations/ambonese) | 171 | | `048` | [Minangkabau (2)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/minangnese) | 172 | | `049` | [Banjar](https://www.ohchr.org/en/human-rights/universal-declaration/translations/banjarnese) | 173 | | `050` | [(Bataknese)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/bataknese) | 174 | | `052` | [Morisyen](https://www.ohchr.org/en/human-rights/universal-declaration/translations/mauritian-kreol) | 175 | | `053` | [Hausa (2)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/haoussa) | 176 | | `054` | [Catalan (2)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/valencian) | 177 | | `055` | [Jamaican Creole English](https://www.ohchr.org/en/human-rights/universal-declaration/translations/patwa) | 178 | | `056` | [Saint Lucian Creole French](https://www.ohchr.org/en/human-rights/universal-declaration/translations/kweyol) | 179 | | `057` | [Maay](https://www.ohchr.org/en/human-rights/universal-declaration/translations/maay) | 180 | | `058` | [Somali (Af Marka)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/af-marka) | 181 | | `059` | [North Saami (2)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/north-saami) | 182 | | `060` | [Inari Saami](https://www.ohchr.org/en/human-rights/universal-declaration/translations/inari-saami) | 183 | | `061` | [Skolt Saami](https://www.ohchr.org/en/human-rights/universal-declaration/translations/skolt-saami) | 184 | | `062` | [Swahili (Chimwiini)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/chimwiini) | 185 | | `063` | [Swahili (Kibajuni)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/kibajuni) | 186 | | `064` | [Dabarre](https://www.ohchr.org/en/human-rights/universal-declaration/translations/dabarre) | 187 | | `065` | [Garre](https://www.ohchr.org/en/human-rights/universal-declaration/translations/garre) | 188 | | `066` | [Jiiddu](https://www.ohchr.org/en/human-rights/universal-declaration/translations/jiiddu) | 189 | | `067` | [Finnish (2)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/finnish) | 190 | | `068` | [French (Welche)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/welche) | 191 | | `069` | [Maori (2)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mbf) | 192 | | `071` | Kabyle | 193 | | `aar` | [Afar](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=aar) | 194 | | `abk` | [Abkhaz](https://www.ohchr.org/en/human-rights/universal-declaration/translations/abkhaz) | 195 | | `ace` | [Aceh](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=atj) | 196 | | `acu` | [Achuar-Shiwiar](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=acu) | 197 | | `acu_1` | [Achuar-Shiwiar (1)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=jiv) | 198 | | `ada` | [Dangme](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gac1) | 199 | | `ady` | [Adyghe](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ady) | 200 | | `afr` | [Afrikaans](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=afk) | 201 | | `agr` | [Aguaruna](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=agr) | 202 | | `aii` | [Assyrian Neo-Aramaic](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=aii) | 203 | | `ajg` | [Aja](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ajg) | 204 | | `aka_akuapem` | [Twi (Akuapem)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tws1) | 205 | | `aka_asante` | [Twi (Asante)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ass) | 206 | | `aka_fante` | [Fante](https://www.ohchr.org/en/node/102556) | 207 | | `als` | [Albanian, Tosk](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=aln) | 208 | | `alt` | [Altai, Southern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=alt) | 209 | | `amc` | [Amahuaca](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=amc) | 210 | | `ame` | [Yaneshaʼ](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ame) | 211 | | `amh` | [Amharic](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=amh) | 212 | | `ami` | [Amis](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ami) | 213 | | `amr` | [Amarakaeri](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=amr) | 214 | | `arb` | [Arabic, Standard](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=arz) | 215 | | `arl` | [Arabela](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=arl) | 216 | | `arn` | [Mapudungun](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=aru) | 217 | | `ast` | [Asturian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=aub) | 218 | | `auc` | [Waorani](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=1127) | 219 | | `auv` | [Occitan (Auvergnat)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=auv1) | 220 | | `ayo` | [Ayoreo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ayo) | 221 | | `ayr` | [Aymara, Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=aym) | 222 | | `azj_cyrl` | [Azerbaijani, North (Cyrillic)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=azb1) | 223 | | `azj_latn` | [Azerbaijani, North (Latin)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=azb) | 224 | | `bam` | [Bamanankan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bra) | 225 | | `ban` | [Bali](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bzc) | 226 | | `bax` | [Bamun](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bax) | 227 | | `bba` | [Baatonum](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bba) | 228 | | `bci` | [Baoulé](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bci) | 229 | | `bcl` | [Bicolano, Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bkl) | 230 | | `bel` | [Belarusan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ruw) | 231 | | `bem` | [Bemba](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bem) | 232 | | `ben` | [Bengali](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bng) | 233 | | `bfa` | [Bari](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bfa) | 234 | | `bho` | [Bhojpuri](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bhj) | 235 | | `bin` | [Edo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=edo) | 236 | | `bis` | [Bislama](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bcy) | 237 | | `blt` | Tai Dam | 238 | | `blu` | [Hmong Njua](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=blu) | 239 | | `boa` | [Bora](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=boa) | 240 | | `bod` | [Tibetan, Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tic) | 241 | | `bos_cyrl` | [Bosnian (Cyrillic)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=src4) | 242 | | `bos_latn` | [Bosnian (Latin)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=src1) | 243 | | `bre` | [Breton](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=brt) | 244 | | `btb` | [Bulu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=btb) | 245 | | `buc` | [Bushi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=buc) | 246 | | `bug` | [Bugis](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bpr) | 247 | | `bul` | [Bulgarian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=blg) | 248 | | `bvi` | [Belanda Viri](https://www.ohchr.org/en/human-rights/universal-declaration/translations/balanda-viri) | 249 | | `cab` | [Garifuna](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cab) | 250 | | `cak` | [Kaqchikel, Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cak1) | 251 | | `cas` | [Tsimané](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cas) | 252 | | `cat` | [Catalan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cln) | 253 | | `cbi` | [Chachi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=1122) | 254 | | `cbr` | [Cashibo-Cacataibo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cbr) | 255 | | `cbs` | [Cashinahua](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cbs) | 256 | | `cbt` | [Chayahuita](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cbt) | 257 | | `cbu` | [Candoshi-Shapra](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cbu) | 258 | | `ccx` | [Zhuang, Yongbei](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ccx) | 259 | | `ceb` | [Cebuano](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ceb) | 260 | | `ces` | [Czech](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=czc) | 261 | | `cha` | [Chamorro](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cjd) | 262 | | `chj` | [Chinantec, Ojitlán](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=chj) | 263 | | `chk` | [Chuukese](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tru1) | 264 | | `chr_cased` | Cherokee (cased) | 265 | | `chr_uppercase` | Cherokee (uppercase) | 266 | | `chv` | [Chuvash](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=chv) | 267 | | `cic` | [Chickasaw](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cic) | 268 | | `cjk` | [Chokwe](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cjk) | 269 | | `cjk_AO` | [Chokwe (Angola)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cjk) | 270 | | `cjs` | [Shor](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cjs) | 271 | | `ckb` | [Kurdish, Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kdb1) | 272 | | `cnh` | [Chin, Haka](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hak) | 273 | | `cni` | [Asháninka](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cni) | 274 | | `cnr` | [Montenegrin](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cnr) | 275 | | `cof` | [Colorado](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cof) | 276 | | `cos` | [Corsican](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=coi) | 277 | | `cot` | [Caquinte](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cot) | 278 | | `cpu` | [Ashéninka, Pichis](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=cpu) | 279 | | `crh` | [Crimean Tatar](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=crh) | 280 | | `crs` | [Seselwa Creole French](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=crs) | 281 | | `csa` | [Chinantec, Chiltepec](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=csa) | 282 | | `csw` | [Cree, Swampy](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=crm) | 283 | | `ctd` | [Chin, Tedim](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tid) | 284 | | `cym` | [Welsh](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=wls) | 285 | | `dag` | [Dagbani](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=dag) | 286 | | `dan` | [Danish](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=dns) | 287 | | `ddn` | [Dendi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=den) | 288 | | `deu_1901` | [German, Standard (1901)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ger) | 289 | | `deu_1996` | German, Standard (1996) | 290 | | `dga` | [Dagaare, Southern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=dga) | 291 | | `dip` | [Dinka, Northeastern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=dinka) | 292 | | `div` | [Maldivian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=div) | 293 | | `dyo` | [Jola-Fonyi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=dyo) | 294 | | `dyu` | [Jula](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=dyu) | 295 | | `dzo` | [Dzongkha](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=dzo) | 296 | | `ell_monotonic` | [Greek (monotonic)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=grk) | 297 | | `ell_polytonic` | Greek (polytonic) | 298 | | `emk` | [Maninkakan, Eastern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mni) | 299 | | `eml` | [Romagnolo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=eml) | 300 | | `eng` | [English](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=eng) | 301 | | `epo` | [Esperanto](https://www.ohchr.org/en/human-rights/universal-declaration/translations/esperanto) | 302 | | `ese` | [Ese Ejja](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ese) | 303 | | `est` | [Estonian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=est) | 304 | | `eus` | [Basque](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bsq) | 305 | | `eve` | [Even](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=eve) | 306 | | `evn` | [Evenki](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=evn) | 307 | | `ewe` | [Éwé](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ewe) | 308 | | `fao` | [Faroese](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fae) | 309 | | `fij` | [Fijian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fji) | 310 | | `fin` | [Finnish](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fin) | 311 | | `fkv` | [Finnish, Kven](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fkv) | 312 | | `flm` | [Chin, Falam](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fal) | 313 | | `fon` | [Fon](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=foa) | 314 | | `fra` | [French](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=frn) | 315 | | `fri` | [Frisian, Western](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fri) | 316 | | `fuf` | [Pular](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fuf) | 317 | | `fur` | [Friulian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=frl) | 318 | | `fuv` | [Fulfulde, Nigerian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fum) | 319 | | `fuv2` | [Fulfulde, Nigerian (2)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fuv) | 320 | | `fvr` | [Fur](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fvr) | 321 | | `gaa` | [Ga](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gac2) | 322 | | `gag` | [Gagauz](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gag) | 323 | | `gax` | [Oromo, Borana-Arsi-Guji](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gax) | 324 | | `gjn` | [Gonja](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=dum) | 325 | | `gkp` | [Kpelle, Guinea](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pke) | 326 | | `gla` | [Gaelic, Scottish](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gls) | 327 | | `gld` | [Nanai](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gld) | 328 | | `gle` | [Gaelic, Irish](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gli1) | 329 | | `glg` | [Galician](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gln) | 330 | | `glv` | Manx | 331 | | `gnw` | [Guarani, Western Bolivian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gnw) | 332 | | `gsw1` | [Alemannisch (Elsassisch)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gsw) | 333 | | `guc` | [Wayuu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=guc) | 334 | | `gug` | [Guaraní, Paraguayan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gun) | 335 | | `guj` | [Gujarati](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gjr) | 336 | | `guu` | [Yanomamö](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=guu) | 337 | | `gyr` | [Guarayu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gua) | 338 | | `hat_kreyol` | [Haitian Creole French (Kreyol)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hat) | 339 | | `hat_popular` | [Haitian Creole French (Popular)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hat1) | 340 | | `hau_NE` | [Hausa (Niger)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gej) | 341 | | `hau_NG` | [Hausa (Nigeria)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gej) | 342 | | `hau_3` | [Hausa](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hau) | 343 | | `haw` | [Hawaiian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hwi) | 344 | | `hea` | [Hmong, Northern Qiandong](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hea) | 345 | | `heb` | [Hebrew](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hbr) | 346 | | `hil` | [Hiligaynon](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hil) | 347 | | `hin` | [Hindi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hnd) | 348 | | `hlt` | [Chin, Matu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hlt) | 349 | | `hms` | [Hmong, Southern Qiandong](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hms) | 350 | | `hna` | [Gen](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hna) | 351 | | `hni` | [Hani](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hni) | 352 | | `hns` | [Hindustani, Sarnami](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hns) | 353 | | `hrv` | [Croatian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=src2) | 354 | | `hsb` | [Sorbian, Upper](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=wee) | 355 | | `hsf` | [Huastec (Sierra de Otontepec)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hus) | 356 | | `hun` | [Hungarian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hng) | 357 | | `hus` | [Huastec (Veracruz)](https://www.ohchr.org/en/human-rights/universal-declaration/translations/tenek-huasteco) | 358 | | `huu` | [Huitoto, Murui](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=huu) | 359 | | `hva` | [Huastec (San Luís Potosí)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=hva) | 360 | | `hye` | [Armenian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=arm) | 361 | | `ibb` | [Ibibio](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ibb) | 362 | | `ibo` | [Igbo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=igr) | 363 | | `ido` | [Ido](https://www.ohchr.org/en/human-rights/universal-declaration/translations/ido) | 364 | | `idu` | [Idoma](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=idu) | 365 | | `ijs` | [Ijo, Southeast](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ijs) | 366 | | `ike` | [Inuktitut, Eastern Canadian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=esb) | 367 | | `ilo` | [Ilocano](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ilo) | 368 | | `ina` | [Interlingua](https://www.ohchr.org/en/human-rights/universal-declaration/translations/interlingua) | 369 | | `ind` | [Indonesian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=inz) | 370 | | `isl` | [Icelandic](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ice) | 371 | | `ita` | [Italian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=itn) | 372 | | `jav` | [Javanese (Latin)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=jan) | 373 | | `jav_java` | Javanese (Javanese) | 374 | | `jiv` | [Shuar](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=1125) | 375 | | `jpn` | [Japanese](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=jpn) | 376 | | `jpn_osaka` | [Japanese (Osaka)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=obe) | 377 | | `jpn_tokyo` | [Japanese (Tokyo)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=to1) | 378 | | `kaa` | [Karakalpak](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kaa) | 379 | | `kal` | [Inuktitut, Greenlandic](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=esg) | 380 | | `kan` | [Kannada](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kjv) | 381 | | `kat` | [Georgian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=geo) | 382 | | `kaz` | [Kazakh](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kaz) | 383 | | `kbd` | [Kabardian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kbd) | 384 | | `kbp` | [Kabiyé](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kbp) | 385 | | `kde` | [Makonde](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kde) | 386 | | `kdh` | [Tem](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kdh) | 387 | | `kea` | [Kabuverdianu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kea) | 388 | | `kek` | [Q'eqchi'](https://www.ohchr.org/en/human-rights/universal-declaration/translations/qechikekchi) | 389 | | `kha` | [Khasi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kha) | 390 | | `khk` | [Mongolian, Halh (Cyrillic)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=khk) | 391 | | `khm` | [Khmer, Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=khm) | 392 | | `kin` | [Rwanda](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=rua1) | 393 | | `kir` | [Kirghiz](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kdo) | 394 | | `kjh` | [Khakas](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kjh) | 395 | | `kkh_lana` | Khün | 396 | | `kmb` | [Mbundu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mlo) | 397 | | `kmr` | [Kurdish, Northern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kur) | 398 | | `knc` | [Kanuri, Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kph) | 399 | | `kng` | [Koongo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kon) | 400 | | `kng_AO` | [Koongo (Angola)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kng) | 401 | | `koi` | [Komi-Permyak](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=koi) | 402 | | `koo` | [Konjo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=koo1) | 403 | | `kor` | [Korean](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kkn) | 404 | | `kqn` | [Kaonde](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kqn) | 405 | | `kqs` | [Kissi, Northern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kqs) | 406 | | `kri` | [Krio](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kri) | 407 | | `krl` | [Karelian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=krl) | 408 | | `ktu` | [Kituba](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ktu) | 409 | | `kwi` | [Awa-Cuaiquer](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kwi) | 410 | | `lad` | [Ladino](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lad) | 411 | | `lao` | [Lao](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nol) | 412 | | `lat` | [Latin](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ltn) | 413 | | `lat_1` | [Latin (1)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ltn1) | 414 | | `lav` | [Latvian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lat) | 415 | | `lia` | [Limba, West-Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lia) | 416 | | `lij` | [Ligurian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lij) | 417 | | `lin` | [Lingala](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lin) | 418 | | `lin_tones` | Lingala (tones) | 419 | | `lit` | [Lithuanian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lit) | 420 | | `lld` | [Ladin](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lld) | 421 | | `lnc` | [Occitan (Languedocien)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=prv1) | 422 | | `lns` | [Lamnso'](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nso) | 423 | | `lob` | [Lobi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lob) | 424 | | `lot` | [Otuho](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lot) | 425 | | `loz` | [Lozi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lbm1) | 426 | | `ltz` | [Luxembourgeois](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lux) | 427 | | `lua` | [Luba-Kasai](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lub) | 428 | | `lue` | [Luvale](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lue) | 429 | | `lug` | [Ganda](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lap1) | 430 | | `lun` | [Lunda](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mlo1) | 431 | | `lus` | [Mizo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lus) | 432 | | `mad` | [Madura](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mhj) | 433 | | `mag` | [Magahi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mqm) | 434 | | `mah` | [Marshallese](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mzm) | 435 | | `mai` | Maithili | 436 | | `mal` | [Malayalam](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mjs) | 437 | | `mal_chillus` | [Malayalam](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mjs) | 438 | | `mam` | [Mam, Northern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mam) | 439 | | `mar` | [Marathi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mrt) | 440 | | `maz` | [Mazahua Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=maz) | 441 | | `mcd` | [Sharanahua](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mcd) | 442 | | `mcf` | [Matsés](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mcf) | 443 | | `men` | [Mende](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mfy) | 444 | | `mfq` | [Moba](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mfq) | 445 | | `mic` | [Micmac](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mic) | 446 | | `min` | [Minangkabau](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mpu) | 447 | | `miq` | [Mískito](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=miq) | 448 | | `mkd` | [Macedonian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mkj) | 449 | | `mlt` | [Maltese](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mls) | 450 | | `mly_arab` | Malay (Arabic) | 451 | | `mly_latn` | [Malay (Latin)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mli) | 452 | | `mnw` | Mon | 453 | | `mor` | [Moro](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mor) | 454 | | `mos` | [Mòoré](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mhm) | 455 | | `mri` | [Maori](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mbf) | 456 | | `mto` | [Mixe, Totontepec](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mto) | 457 | | `mtp` | [Wichí Lhamtés Nocten](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mtp) | 458 | | `mxi` | [Mozarabic](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=moz) | 459 | | `mxv` | [Mixtec, Metlatónoc](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mxv) | 460 | | `mya` | [Burmese](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=bms) | 461 | | `mzi` | [Mazatec, Ixcatlán](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mao) | 462 | | `nav` | [Navajo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nav) | 463 | | `nba` | [Nyemba](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nba) | 464 | | `nbl` | [Ndebele](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nel) | 465 | | `ndo` | [Ndonga](https://www.ohchr.org/en/human-rights/universal-declaration/translations/oshiwambo-ndonga) | 466 | | `nds` | [Saxon, Low](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ige) | 467 | | `nep` | [Nepali](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nep) | 468 | | `nhn` | [Nahuatl, Central](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nhn) | 469 | | `nio` | [Nganasan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nio) | 470 | | `niu` | [Niue](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=niu) | 471 | | `niv` | [Gilyak](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=Nivkh) | 472 | | `njo` | [Naga, Ao](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=njo) | 473 | | `nku` | [Kulango, Bouna](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kou) | 474 | | `nld` | [Dutch](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=dut) | 475 | | `nno` | [Norwegian, Nynorsk](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nrn) | 476 | | `nob` | [Norwegian, Bokmål](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nrr) | 477 | | `not` | [Nomatsiguenga](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=not) | 478 | | `nso` | [Sotho, Northern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=srt) | 479 | | `nya_chechewa` | [Nyanja (Chechewa)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nyj1) | 480 | | `nya_chinyanja` | [Nyanja (Chinyanja)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nyj) | 481 | | `nym` | [Nyamwezi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nyz) | 482 | | `nyn` | [Nyankore](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nyn1) | 483 | | `nzi` | [Nzema](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=nze) | 484 | | `oaa` | [Orok](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=oaa) | 485 | | `oci_1` | [Francoprovençal (Fribourg)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=Fr3) | 486 | | `oci_2` | [Francoprovençal (Savoie)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fr2) | 487 | | `oci_3` | [Francoprovençal (Vaud)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=fr4) | 488 | | `oci_4` | [Francoprovençal (Valais)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=frp) | 489 | | `ojb` | [Ojibwa, Northwestern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ojb) | 490 | | `oki` | [Okiek](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=oki) | 491 | | `orh` | [Oroqen](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=orh) | 492 | | `oss` | [Osetin](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ose) | 493 | | `ote` | [Otomi, Mezquital](https://www.ohchr.org/en/human-rights/universal-declaration/translations/nahnu-otomi) | 494 | | `pam` | [Pampangan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pmp) | 495 | | `pan` | [Panjabi, Eastern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pnj1) | 496 | | `pap` | [Papiamentu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pap) | 497 | | `pau` | [Palauan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=plu) | 498 | | `pbb` | [Páez](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pbb) | 499 | | `pbu` | [Pashto, Northern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pbu) | 500 | | `pcd` | [Picard](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=frn2) | 501 | | `pcm` | [Pidgin, Nigerian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pcm) | 502 | | `pes_1` | [Farsi, Western](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=prs) | 503 | | `pes_2` | [Dari](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=prs1) | 504 | | `pis` | [Pijin](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pis) | 505 | | `piu` | [Pintupi-Luritja](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=piu) | 506 | | `plt` | [Malagasy, Plateau](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mex) | 507 | | `pnb` | Panjabi, Western | 508 | | `pol` | [Polish](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pql) | 509 | | `pon` | [Pohnpeian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pnf) | 510 | | `por_BR` | Portuguese (Brazil) | 511 | | `por_PT` | [Portuguese (Portugal)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=por) | 512 | | `pov` | [Crioulo, Upper Guinea](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=gbc) | 513 | | `ppl` | [Pipil](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ppl) | 514 | | `prv` | [Occitan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pro) | 515 | | `quc` | [K'iche', Central](https://www.ohchr.org/en/human-rights/universal-declaration/translations/kiche-quiche) | 516 | | `qud` | [Quechua (Unified Quichua, old Hispanic orthography)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qud1) | 517 | | `qug` | [Quichua, Chimborazo Highland](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qug) | 518 | | `qul` | [Quechua, North Bolivian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qul) | 519 | | `quy` | [Quechua, Ayacucho](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=quy) | 520 | | `quz` | [Quechua, Cusco](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=quz) | 521 | | `qva` | [Quechua, Ambo-Pasco](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qeg) | 522 | | `qvc` | [Quechua, Cajamarca](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qnt) | 523 | | `qvh` | [Quechua, Huamalíes-Dos de Mayo Huánuco](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qej) | 524 | | `qvm` | [Quechua, Margos-Yarowilca-Lauricocha](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qei) | 525 | | `qvn` | [Quechua, North Junín](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qju) | 526 | | `qwh` | [Quechua, Huaylas Ancash](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qan) | 527 | | `qxa` | [Quechua, South Bolivian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qec1) | 528 | | `qxn` | [Quechua, Northern Conchucos Ancash](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qed) | 529 | | `qxu` | [Quechua, Arequipa-La Unión](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=qar) | 530 | | `rar` | [Rarotongan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=rrt) | 531 | | `rmn` | [Romani, Balkan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=rmn) | 532 | | `rmn_1` | [Romani, Balkan (1)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=rmn1) | 533 | | `rmy` | [Aromanian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=rmy1) | 534 | | `roh` | Romansch | 535 | | `roh_puter` | Romansch (Puter) | 536 | | `roh_rumgr` | [Romansch (Grischun)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=rhe) | 537 | | `roh_surmiran` | Romansch (Surmiran) | 538 | | `roh_sursilv` | Romansch (Sursilvan) | 539 | | `roh_sutsilv` | Romansch (Sutsilvan) | 540 | | `roh_vallader` | Romansch (Vallader) | 541 | | `ron_1953` | [Romanian (1953)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=rum) | 542 | | `ron_1993` | Romanian (1993) | 543 | | `ron_2006` | Romanian (2006) | 544 | | `run` | [Rundi](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=rud1) | 545 | | `rus` | [Russian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=rus) | 546 | | `sag` | [Sango](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=saj) | 547 | | `sah` | [Yakut](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=sah) | 548 | | `san` | [Sanskrit](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=skt) | 549 | | `sco` | [Scots](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=sco) | 550 | | `sey` | [Secoya](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=1123) | 551 | | `shk` | [Shilluk](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=shk) | 552 | | `shn` | [Shan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=sjn) | 553 | | `shp` | [Shipibo-Conibo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=shp) | 554 | | `sin` | [Sinhala](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=snh) | 555 | | `skr` | [Seraiki](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=skr) | 556 | | `slk` | [Slovak](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=slo) | 557 | | `slr` | [Salar](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=slr) | 558 | | `slv` | [Slovenian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=slv) | 559 | | `sme` | [North Saami](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=lpi) | 560 | | `smo` | [Samoan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=smy) | 561 | | `sna` | [Shona](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=shd) | 562 | | `snk` | [Soninke](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=snn) | 563 | | `snn` | [Siona](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=1121) | 564 | | `som` | [Somali](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=som) | 565 | | `sot` | [Sotho, Southern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=sso) | 566 | | `spa` | [Spanish](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=spn) | 567 | | `src` | [Sardinian, Logudorese](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=srd) | 568 | | `srp_cyrl` | [Serbian (Cyrillic)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=src5) | 569 | | `srp_latn` | [Serbian (Latin)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=src3) | 570 | | `srq` | [Sirionó](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=srq) | 571 | | `srr` | [Serer-Sine](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ses) | 572 | | `ssw` | [Swati](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=swz1) | 573 | | `suk` | [Sukuma](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=sua) | 574 | | `sun` | [Sunda](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=suo) | 575 | | `sus` | [Susu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=sus) | 576 | | `swb` | [Comorian, Maore](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=swb) | 577 | | `swe` | [Swedish](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=swd) | 578 | | `swh` | [Swahili](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=swa) | 579 | | `tah` | [Tahitian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tht) | 580 | | `tam` | [Tamil](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tcv) | 581 | | `tam_LK` | Tamil (Sri Lanka) | 582 | | `tat` | [Tatar](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ttr) | 583 | | `tbz` | [Ditammari](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tbz) | 584 | | `tca` | [Ticuna](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tca) | 585 | | `tel` | [Telugu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tcw) | 586 | | `tem` | [Themne](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tej) | 587 | | `tet` | [Tetun](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ttm) | 588 | | `tgk` | [Tajiki](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pet) | 589 | | `tgl` | [Tagalog](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tgl) | 590 | | `tha` | [Thai](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=thj) | 591 | | `tha2` | Thai (2) | 592 | | `tir` | [Tigrigna](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tgn) | 593 | | `tiv` | [Tiv](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tiv) | 594 | | `tji` | [Tujia, Nothern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tji) | 595 | | `tly` | [Talysh](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tly) | 596 | | `tna` | [Tacana](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tna) | 597 | | `tob` | [Toba](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tob) | 598 | | `toi` | [Tonga](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=toi) | 599 | | `toj` | [Tojolabal](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=toj) | 600 | | `ton` | [Tongan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tov) | 601 | | `top` | [Totonac, Papantla](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=top) | 602 | | `tpi` | [Tok Pisin](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=pdg) | 603 | | `trn` | [Trinitario](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=trn) | 604 | | `tsn` | [Tswana](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tsw) | 605 | | `tso_MZ` | [Tsonga (Mozambique)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tso) | 606 | | `tso_ZW` | [Tsonga (Zimbabwe)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tso1) | 607 | | `tsz` | [Purepecha](https://www.ohchr.org/en/human-rights/universal-declaration/translations/purhepecha) | 608 | | `tuk_cyrl` | [Turkmen (Cyrillic)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tck) | 609 | | `tuk_latn` | Turkmen (Latin) | 610 | | `tur` | [Turkish](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=trk) | 611 | | `tyv` | [Tuva](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tyv) | 612 | | `tzc` | [Tzotzil (Chamula)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tzc) | 613 | | `tzh` | [Tzeltal, Oxchuc](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tzc1) | 614 | | `tzm` | [Tamazight, Central Atlas](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tzm) | 615 | | `udu` | [Uduk](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=udu) | 616 | | `uig_arab` | [Uyghur (Arabic)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=uig) | 617 | | `uig_latn` | Uyghur (Latin) | 618 | | `ukr` | [Ukrainian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ukr) | 619 | | `umb` | [Umbundu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=mnf) | 620 | | `ura` | [Urarina](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ura) | 621 | | `urd` | [Urdu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=urd) | 622 | | `urd_2` | [Urdu (2)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=urd) | 623 | | `uzn_cyrl` | [Uzbek, Northern (Cyrillic)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=uzb1) | 624 | | `uzn_latn` | [Uzbek, Northern (Latin)](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=uzb) | 625 | | `vai` | [Vai](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=vai) | 626 | | `vec` | [Venetian](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=vec) | 627 | | `ven` | [Venda](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=tsh) | 628 | | `ven2` | [Venda](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ven) | 629 | | `vep` | [Veps](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=vep) | 630 | | `vie` | [Vietnamese](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=vie) | 631 | | `vmw` | [Makhuwa](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=vmw) | 632 | | `war` | [Waray-Waray](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=wry) | 633 | | `wln` | [Walloon](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=frn1) | 634 | | `wol` | [Wolof](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=wol) | 635 | | `wwa` | [Waama](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ako) | 636 | | `xho` | [Xhosa](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=xos) | 637 | | `xsm` | [Kasem](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=kas) | 638 | | `yad` | [Yagua](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=yad) | 639 | | `yao` | [Yao](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=yao) | 640 | | `yap` | [Yapese](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=yps) | 641 | | `ydd` | [Yiddish, Eastern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ydd) | 642 | | `ykg` | [Yukaghir, Northern](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ykg) | 643 | | `yor` | [Yoruba](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=yor) | 644 | | `yrk` | [Nenets](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=yrk) | 645 | | `yua` | [Maya, Yucatán](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=yua) | 646 | | `yuz` | [Yuracare](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=yuz) | 647 | | `zam` | [Zapotec, Miahuatlán](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=zam) | 648 | | `zdj` | [Comorian, Ngazidja](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=zdj) | 649 | | `zgh` | [Tamazight, Standard Morocan](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ama) | 650 | | `zro` | [Záparo](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=1124) | 651 | | `ztu` | [Zapotec, Güilá](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=ztu1) | 652 | | `zul` | [Zulu](https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=zuu) | 653 | 654 | 655 | 656 | ## Compatibility 657 | 658 | This package is at least compatible with all maintained versions of Node.js. 659 | As of now, 660 | that is Node.js 18+. 661 | It also works in Deno and modern browsers. 662 | 663 | ## Contribute 664 | 665 | Yes please! 666 | See [How to Contribute to Open Source][opensource-guide-contribute]. 667 | 668 | ## Security 669 | 670 | This package is safe. 671 | 672 | ## License 673 | 674 | [MIT][file-license] © [Titus Wormer][wooorm] 675 | 676 | 677 | 678 | [api-min]: #min 679 | 680 | [api-top]: #top 681 | 682 | [badge-build-image]: https://github.com/wooorm/trigrams/workflows/main/badge.svg 683 | 684 | [badge-build-url]: https://github.com/wooorm/trigrams/actions 685 | 686 | [badge-coverage-image]: https://img.shields.io/codecov/c/github/wooorm/trigrams.svg 687 | 688 | [badge-coverage-url]: https://codecov.io/github/wooorm/trigrams 689 | 690 | [badge-downloads-image]: https://img.shields.io/npm/dm/trigrams.svg 691 | 692 | [badge-downloads-url]: https://www.npmjs.com/package/trigrams 693 | 694 | [efele-udhr]: http://efele.net/udhr/ 695 | 696 | [esmsh]: https://esm.sh 697 | 698 | [file-license]: license 699 | 700 | [github-gist-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c 701 | 702 | [github-wooorm-udhr]: https://github.com/wooorm/udhr 703 | 704 | [npmjs-install]: https://docs.npmjs.com/cli/install 705 | 706 | [ohchr-udhr]: https://www.ohchr.org/EN/UDHR/Pages/UDHRIndex.aspx 707 | 708 | [opensource-guide-contribute]: https://opensource.guide/how-to-contribute/ 709 | 710 | [typescript]: https://www.typescriptlang.org 711 | 712 | [wooorm]: https://wooorm.com 713 | -------------------------------------------------------------------------------- /script/build-data.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-await-in-loop */ 2 | 3 | import fs from 'node:fs/promises' 4 | import {fromHtml} from 'hast-util-from-html' 5 | import {selectAll} from 'hast-util-select' 6 | import {toString} from 'hast-util-to-string' 7 | import {resolve} from 'import-meta-resolve' 8 | import {asTuples, tuplesAsDictionary} from 'trigram-utils' 9 | import {udhr} from 'udhr' 10 | 11 | /** @type {Record>} */ 12 | const min = {} 13 | /** @type {Record>} */ 14 | const top = {} 15 | 16 | // Variables to keep track of some information. 17 | /** @type {[string, number]} */ 18 | let highestTrigram = ['', 0] 19 | /** @type {string | undefined} */ 20 | let highestTrigramLanguage 21 | const ignore = new Set(['ccp', 'fuf_adlm', 'san_gran']) 22 | let index = -1 23 | let allCount = 0 24 | 25 | const base = new URL(await resolve('udhr', import.meta.url)) 26 | 27 | while (++index < udhr.length) { 28 | const info = udhr[index] 29 | 30 | if (ignore.has(info.code)) { 31 | continue 32 | } 33 | 34 | const tree = fromHtml( 35 | await fs.readFile(new URL('declaration/' + info.code + '.html', base)) 36 | ) 37 | 38 | let plain = '' 39 | 40 | for (const paragraph of selectAll('article p', tree)) { 41 | plain += ' ' + toString(paragraph) 42 | } 43 | 44 | const trigrams = asTuples(plain) 45 | const topTrigrams = trigrams.slice(-300) 46 | let totalTopTrigramOccurrences = 0 47 | let trigramIndex = -1 48 | 49 | while (++trigramIndex < topTrigrams.length) { 50 | totalTopTrigramOccurrences += topTrigrams[trigramIndex][1] 51 | } 52 | 53 | console.log( 54 | [ 55 | 'Writing trigram file for: %s', 56 | '', 57 | '* Code: `%s`;', 58 | '* Highest trigram: `%s`;', 59 | '* Highest trigram count: %s;', 60 | '* Total trigrams: %s;', 61 | '* Top trigrams count: %s;', 62 | '* String length: %s;' 63 | ].join('\n'), 64 | info.name, 65 | info.code, 66 | trigrams[trigrams.length - 1][0], 67 | trigrams[trigrams.length - 1][1], 68 | trigrams.length, 69 | totalTopTrigramOccurrences, 70 | plain.length 71 | ) 72 | 73 | if (trigrams[trigrams.length - 1][1] > highestTrigram[1]) { 74 | highestTrigram = trigrams[trigrams.length - 1] 75 | highestTrigramLanguage = info.name 76 | } 77 | 78 | allCount++ 79 | 80 | if ( 81 | trigrams.length > 300 && 82 | trigrams[trigrams.length - 1][1] > 30 && 83 | plain.length / totalTopTrigramOccurrences < 2.5 84 | ) { 85 | top[info.code] = tuplesAsDictionary(topTrigrams) 86 | 87 | /** @type {Array} */ 88 | const values = [] 89 | 90 | for (const trigram of topTrigrams) { 91 | values.push(trigram[0]) 92 | } 93 | 94 | min[info.code] = values 95 | 96 | console.log( 97 | '* Top trigram file: yes;\n- Min trigram file: yes.' 98 | ) 99 | } else { 100 | console.log( 101 | '* Top trigram file: no;\n- Min trigram file: no.' 102 | ) 103 | } 104 | 105 | console.log('') 106 | } 107 | 108 | // Log information regarding the highest trigram. 109 | console.log( 110 | 'The highest trigram was `%s` which occurred %s times in %s.\n', 111 | highestTrigram[0], 112 | highestTrigram[1], 113 | highestTrigramLanguage 114 | ) 115 | 116 | // Write the file containing top trigrams. 117 | await fs.writeFile( 118 | new URL('../lib/top.json', import.meta.url), 119 | JSON.stringify(top, undefined, 2) + '\n' 120 | ) 121 | 122 | console.log( 123 | 'Finished writing %s top files (ignoring %s).\n', 124 | Object.keys(top).length, 125 | allCount - Object.keys(top).length 126 | ) 127 | 128 | // Write the file containing top trigrams as an array. 129 | await fs.writeFile( 130 | new URL('../lib/min.json', import.meta.url), 131 | JSON.stringify(min, undefined, 2) + '\n' 132 | ) 133 | 134 | console.log( 135 | 'Finished writing %s min files (ignoring %s).\n', 136 | Object.keys(min).length, 137 | allCount - Object.keys(min).length 138 | ) 139 | -------------------------------------------------------------------------------- /script/build-support.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @import {Root, Table} from 'mdast' 3 | */ 4 | 5 | import {zone} from 'mdast-zone' 6 | import {udhr} from 'udhr' 7 | import {min} from '../index.js' 8 | 9 | const data = await min() 10 | 11 | /** 12 | * @returns 13 | * Transform. 14 | */ 15 | export default function remarkInjectSupport() { 16 | /** 17 | * @param {Root} tree 18 | * Tree. 19 | * @returns {undefined} 20 | * Nothing. 21 | */ 22 | return function (tree) { 23 | zone(tree, 'support', function (start, _, end) { 24 | /** @type {Table} */ 25 | const table = { 26 | type: 'table', 27 | align: [], 28 | children: [ 29 | { 30 | type: 'tableRow', 31 | children: [ 32 | {type: 'tableCell', children: [{type: 'text', value: 'Code'}]}, 33 | {type: 'tableCell', children: [{type: 'text', value: 'Name'}]} 34 | ] 35 | } 36 | ] 37 | } 38 | 39 | for (const info of Object.values(udhr)) { 40 | if (!(info.code in data)) { 41 | continue 42 | } 43 | 44 | const ohchrUrl = info.ohchr 45 | ? /^https?:/.test(info.ohchr) 46 | ? info.ohchr 47 | : 'https://www.ohchr.org/EN/UDHR/Pages/Language.aspx?LangID=' + 48 | info.ohchr 49 | : undefined 50 | 51 | table.children.push({ 52 | type: 'tableRow', 53 | children: [ 54 | { 55 | type: 'tableCell', 56 | children: [{type: 'inlineCode', value: info.code}] 57 | }, 58 | { 59 | type: 'tableCell', 60 | children: ohchrUrl 61 | ? [ 62 | { 63 | type: 'link', 64 | url: ohchrUrl, 65 | children: [{type: 'text', value: info.name}] 66 | } 67 | ] 68 | : [{type: 'text', value: info.name}] 69 | } 70 | ] 71 | }) 72 | } 73 | 74 | return [start, table, end] 75 | }) 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /test.js: -------------------------------------------------------------------------------- 1 | import assert from 'node:assert/strict' 2 | import test from 'node:test' 3 | import {min, top} from 'trigrams' 4 | 5 | test('trigrams', async function (t) { 6 | await t.test('should expose the public api', async function () { 7 | assert.deepEqual(Object.keys(await import('trigrams')).sort(), [ 8 | 'min', 9 | 'top' 10 | ]) 11 | }) 12 | }) 13 | 14 | test('top()[]', async function (t) { 15 | const data = await top() 16 | 17 | await t.test('should be an object', async function () { 18 | for (const [code, value] of Object.entries(data)) { 19 | assert.strictEqual(typeof value, 'object', code + ' should be an object') 20 | } 21 | }) 22 | 23 | await t.test('should contain 300 values', async function () { 24 | for (const [code, value] of Object.entries(data)) { 25 | assert.strictEqual( 26 | Object.keys(value).length, 27 | 300, 28 | code + ' should have 300 values' 29 | ) 30 | } 31 | }) 32 | 33 | await t.test('should contain integers', async function () { 34 | for (const [code, value] of Object.entries(data)) { 35 | for (const [trigram, count] of Object.entries(value)) { 36 | assert.strictEqual( 37 | typeof count, 38 | 'number', 39 | trigram + ' in ' + code + ' should be a number' 40 | ) 41 | 42 | assert.strictEqual( 43 | Math.round(count), 44 | count, 45 | trigram + ' in ' + code + ' should be an integer' 46 | ) 47 | } 48 | } 49 | }) 50 | }) 51 | 52 | test('min()[]', async function (t) { 53 | const data = await min() 54 | 55 | await t.test('should be an array', async function () { 56 | for (const [code, value] of Object.entries(data)) { 57 | assert.ok(Array.isArray(value), code + ' should be an array') 58 | } 59 | }) 60 | 61 | await t.test('should contain 300 values', async function () { 62 | for (const [code, value] of Object.entries(data)) { 63 | assert.strictEqual(value.length, 300, code + ' should have 300 values') 64 | } 65 | }) 66 | 67 | await t.test('should contain strings', async function () { 68 | for (const [code, value] of Object.entries(data)) { 69 | let index = -1 70 | while (++index < value.length) { 71 | assert.strictEqual( 72 | typeof value[index], 73 | 'string', 74 | index + ' in ' + code + ' should be a string' 75 | ) 76 | } 77 | } 78 | }) 79 | }) 80 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "checkJs": true, 4 | "declarationMap": true, 5 | "declaration": true, 6 | "emitDeclarationOnly": true, 7 | "exactOptionalPropertyTypes": true, 8 | "lib": ["es2022"], 9 | "module": "node16", 10 | "strict": true, 11 | "target": "es2022" 12 | }, 13 | "include": ["**/*.js"], 14 | "exclude": ["coverage", "node_modules"] 15 | } 16 | --------------------------------------------------------------------------------