{"id":37074023,"url":"https://github.com/thrkll/pylond","last_synced_at":"2026-01-14T08:43:07.120Z","repository":{"id":65352670,"uuid":"478336040","full_name":"thrkll/pylond","owner":"thrkll","description":"Python package to translate names of countries, nationalities and languages to Icelandic :iceland:","archived":false,"fork":false,"pushed_at":"2025-06-08T01:07:18.000Z","size":50,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-09T21:08:48.843Z","etag":null,"topics":["country-codes","iceland","icelandic-language","icelandic-translation","iso3166","iso639","localization","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pylond/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thrkll.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-05T23:42:46.000Z","updated_at":"2025-06-08T01:07:22.000Z","dependencies_parsed_at":"2023-01-23T10:54:56.335Z","dependency_job_id":null,"html_url":"https://github.com/thrkll/pylond","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/thrkll/pylond","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thrkll%2Fpylond","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thrkll%2Fpylond/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thrkll%2Fpylond/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thrkll%2Fpylond/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thrkll","download_url":"https://codeload.github.com/thrkll/pylond/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thrkll%2Fpylond/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["country-codes","iceland","icelandic-language","icelandic-translation","iso3166","iso639","localization","python"],"created_at":"2026-01-14T08:43:06.594Z","updated_at":"2026-01-14T08:43:07.107Z","avatar_url":"https://github.com/thrkll.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pylond\n\n[![Python](https://img.shields.io/badge/Python_3-3776AB?logo=python\u0026logoColor=white)](https://opensource.org/licenses/MIT)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green)](https://opensource.org/licenses/MIT)\n[![PyPI](https://img.shields.io/pypi/v/pylond?logo=python\u0026logoColor=white)]()\n[![Release](https://img.shields.io/github/v/release/thrkll/pylond)]()\n[![pytest](https://github.com/thrkll/pylond/actions/workflows/python-app.yml/badge.svg)]()\n\n### Icelandic translations of countries, nationalities and languages\n\n`pylond` is a Python 3.6+ package that provides Icelandic translations of countries, nationalities and languages.\n\n## Installation\n\n`pylond` is available to install via [PyPi](). \n\n```\n$ pip install pylond\n```\n\nAlternatively, clone the repository and install the package using the following commands.\n\n```\n$ git clone https://github.com/thrkll/pylond.git\n$ cd pylond\n$ python setup.py install\n```\n\n## Usage examples\n\n###  Look up a country based on the ISO-3166 codes\n\n###### 🔎 By two letter country code (ISO-3166-1 alpha2)\n\n```python\n\u003e\u003e\u003e from pylond import alpha2\n\n\u003e\u003e\u003e result = alpha2('KG')\n\u003e\u003e\u003e pprint(result)\n\n{'adjective_f': 'kirgisk',\n 'adjective_m': 'kirgiskur',\n 'adjective_n': 'kirgiskt',\n 'alpha2': 'KG',\n 'alpha3': 'KGZ',\n 'english_short_name': 'Kyrgyzstan',\n 'formal_name': 'Kirgiska lýðveldið',\n 'demonym': 'Kirgisi',\n 'numeric': '417',\n 'short_name': 'Kirgistan',\n 'preposition': 'í'}\n```\n\n###### 🔎 By three letter country code (ISO-3166-1 alpha3)\n\n```python\n\u003e\u003e\u003e from pylond import alpha3\n\n\u003e\u003e\u003e result = alpha2('BWA')\n\u003e\u003e\u003e pprint(result)\n\n{'adjective_f': 'botsvönsk',\n 'adjective_m': 'botsvanskur',\n 'adjective_n': 'botsvanskt',\n 'alpha2': 'BW',\n 'alpha3': 'BWA',\n 'english_short_name': 'Botswana',\n 'formal_name': 'Lýðveldið Botsvana',\n 'demonym': 'Botsvanamaður',\n 'numeric': '72',\n 'short_name': 'Botsvana',\n 'preposition': 'í'}\n```\n\n###### 🔎 By three digit numeric code (ISO-3166-1 numeric)\n\n```python\n\u003e\u003e\u003e from pylond import numeric\n\n\u003e\u003e\u003e result = numeric(203)\n\u003e\u003e\u003e pprint(result)\n\n{'adjective_f': 'tékknesk',\n 'adjective_m': 'tékkneskur',\n 'adjective_n': 'tékkneskt',\n 'alpha2': 'CZ',\n 'alpha3': 'CZE',\n 'english_short_name': 'Czechia',\n 'formal_name': 'Tékkneska lýðveldið',\n 'demonym': 'Tékki',\n 'numeric': '203',\n 'short_name': 'Tékkland',\n 'preposition': 'í'}\n```\n\n### Country lookup based on English short name\n\n###### 🔎 By English short name as defined by ISO-3166-1\n\n```python\n\u003e\u003e\u003e from pylond import country_lookup\n\n\u003e\u003e\u003e result = country_lookup('guyana')\n\u003e\u003e\u003e pprint(result)\n\n[{'adjective_f': 'gvæjönsk',\n  'adjective_m': 'gvæjanskur',\n  'adjective_n': 'gvæjanskt',\n  'alpha2': 'GY',\n  'alpha3': 'GUY',\n  'english_short_name': 'Guyana',\n  'formal_name': 'Samvinnulýðveldið Gvæjana',\n  'lev_ratio': 1.0,\n  'demonym': 'Gvæjanamaður',\n  'numeric': '328',\n  'short_name': 'Gvæjana',\n  'preposition': 'í'}]\n```\n\n###### 🔎 The optional `lev_ratio` parameter can aid with unconvential name spelling. The input string will be compared to the data with a [levenshtein matching](https://en.wikipedia.org/wiki/Levenshtein_distance) ratio. A value of `1.0` (default) represents a perfect match. Additionally, you can supply a `lang` parameter that takes either `is` or `en` (default) depending on which of the languages you want to iterate through. \n\n\n```python\n\u003e\u003e\u003e from pylond import country_lookup\n\n\u003e\u003e\u003e result = country_lookup('iseland', lev_ratio=0.8, lang='en')\n\u003e\u003e\u003e pprint(result)\n\n[{'adjective_f': 'írsk',\n  'adjective_m': 'írskur',\n  'adjective_n': 'írskt',\n  'alpha2': 'IE',\n  'alpha3': 'IRL',\n  'english_short_name': 'Ireland',\n  'formal_name': '',\n  'lev_ratio': 0.86,\n  'demonym': 'Íri',\n  'numeric': '372',\n  'short_name': 'Írland',\n  'preposition': 'í'},\n {'adjective_f': 'íslensk',\n  'adjective_m': 'íslenskur',\n  'adjective_n': 'íslenskt',\n  'alpha2': 'IS',\n  'alpha3': 'ISL',\n  'english_short_name': 'Iceland',\n  'formal_name': '',\n  'lev_ratio': 0.86,\n  'demonym': 'Íslendingur',\n  'numeric': '352',\n  'short_name': 'Ísland',\n  'preposition': 'á'}]\n```\n\n### Return all countries or languages \n\n###### 🔎 `iter_countries` and `iter_languages` will return an alphabetic list of all countries or languages respectively. The optional `sort` parameter takes either `is` or `en` (default) depending on which language to sort by.\n\n```python\n\u003e\u003e\u003e from pylond import iter_countries, iter_languages\n\n\u003e\u003e\u003e result = iter_countries(sort='is')\n\u003e\u003e\u003e pprint(result)\n\n[{country 1 🌎},\n {country 2 🌎},\n {et cetera 🌎}]\n\n\u003e\u003e\u003e result = iter_languages(sort='is')\n\u003e\u003e\u003e pprint(result)\n\n[{language 1 🧾},\n {language 2 🧾},\n {et cetera  🧾}]\n\n```\n### Look up a language based on the ISO-639 code\n\n###### 🔎 By three letter language code (ISO-3166-3 alpha3)\n\n```python\n\u003e\u003e\u003e from pylond import lang_alpha3\n\n\u003e\u003e\u003e result = lang_alpha3('bre')\n\u003e\u003e\u003e pprint(result)\n\n{'alpha3': 'bre', \n 'english_name': 'Breton', \n 'icelandic_name': 'bretónska'}\n\n```\n\n### Language lookup based on English name\n\n###### 🔎 Based on English language name as defined by ISO-639-3\n```python\n\u003e\u003e\u003e from pylond import lang_lookup\n\n\u003e\u003e\u003e result = lang_lookup('polish')\n\u003e\u003e\u003e pprint(result)\n\n[{'alpha3': 'pol',\n  'english_name': 'Polish',\n  'icelandic_name': 'pólska',\n  'lev_ratio': 1.0}]\n\n```\n###### 🔎 The optional `lev_ratio` parameter can aid with unconvential name spelling. The input string will be compared to the data with a [levenshtein matching](https://en.wikipedia.org/wiki/Levenshtein_distance) ratio. A value of `1.0` (default) represents a perfect match. Additionally, you can supply a `lang` parameter that takes either `is` or `en` (default) depending on which of the languages you want to iterate through. \n\n```python\n\u003e\u003e\u003e from pylond import lang_lookup\n\n\u003e\u003e\u003e result = lang_lookup('albaníska', lang='is', lev_ratio=0.9)\n\u003e\u003e\u003e pprint(result)\n\n[{'alpha3': 'sqi',\n  'english_name': 'Albanian',\n  'icelandic_name': 'albanska',\n  'lev_ratio': 0.94}]\n\n```\n\n## Data\n\nThe data is [stored as CSV files](https://github.com/thrkll/pylond/blob/main/pylond/data) so it can also be utilized independent of the `pylond` package.\n\n\n### Limitations\n\n`pylond` exclusively includes sovereign UN member and observer state countries. Not all names of languages specified in ISO 639 have been translated to Icelandic. Included in `pylond` are nonetheless all languages that have a status of an official language in any sovereign UN member state with some additional ones.  \n\nFor some countries, no official formal name exists and is therefore not translatable to Icelandic. Similarly, some countries either do not have an existing demonym (e.g. the Holy See) or no Icelandic translation exists (e.g. Saint Kitts and Nevis). In rare cases, adjectives of nationalities do not exist (e.g. Côte d'Ivoire) and are therefore missing from the data.\n\n### Source of data\n\nCodes and English names are as per the ISO 3166 and ISO 639 standards.\n\nIcelandic translations of language names, short and formal country names are from the Icelandic Term Bank. If two or more translations of a country name exist, only the translation recommended by the Language Planning Department of the Árni Magnússon Institute for Icelandic Studies is used. \n\n`pylond` also embeds data from the [Database of Icelandic Morphology (DIM)](https://bin.arnastofnun.is/DMII/).\n\n#### 📄 [ISO 3166 Country codes](https://www.iso.org/iso-3166-country-codes.html)\n\n#### 📄 [ISO 639 Language codes](https://www.iso.org/iso-639-language-codes.html)\n\n#### 📄 [The Icelandic Term bank / Íðorðabankinn](https://clarin.is/en/resources/termbank/) (CC-BY-SA 4.0)\n\n#### 📄 [Database of Icelandic Morphology / Beygingarlýsing íslensks nútímamáls](https://bin.arnastofnun.is/) (CC-BY-SA 4.0)\n\n\n## Versions\n\n📦 0.2.0 - Added support for locative prepositions\n\n📦 0.1.0 - Added support for translations of languages\n\n📦 0.0.1 - Initial unstable release\n\n## Licence\n\nMIT License\n\nCopyright (c) 2022 Þorkell Einarsson\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n---\n\nThe recipient of data from DIM is required to accredit the right holder clearly in the user interface of all products based on the data. The following is hereby attributed: _The Database of Icelandic Morphology. The Árni Magnússon Institute for Icelandic Studies. Author and editor Kristín Bjarnadóttir_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthrkll%2Fpylond","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthrkll%2Fpylond","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthrkll%2Fpylond/lists"}