Skip to main content

Get ISO code for a given language

Project description

ISO Language Codes

https://img.shields.io/pypi/v/iso_language_codes.svg https://img.shields.io/travis/kirinokirino/iso_language_codes.svg Documentation Status

Get ISO code for a given language

Usage

Import this package in your script:

>>> from iso_language_codes import *

Get info about a language via Two-letter ISO code:

>>> language('ru')
    {'Name': 'Russian', 'Autonym': 'Р СѓСЃСЃРєРёР№'}

Or get name and autonym directly with:

>>> language_name('ru')
    'Russian'
>>> language_autonym('ru')
    'Р СѓСЃСЃРєРёР№'

You can also get entire dictionary of languages:

>>> languages = language_dictionary()
>>> languages.keys()
    dict_keys(['', 'aa', 'bn', 'ab', ...])

Credits

This package uses edited iso639-autonyms database from bbqsrc/iso639-autonyms

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0

  • Base from filled cookiecutter-pypackage template.

0.2.0

  • Basic functionality of the module.

0.3.0

  • Added Tests for language, language_name and language_autonym functions.

  • Added Documentation.

  • Fixed bug with path to database.

  • Metadata changes.

1.0.0

  • Changes to CONTRIBUTING.rst.

  • Changes to Makefile.

  • Changes to README.rst.

  • Added usage examples and credited database source.

  • Compiled documentation.

1.1.0

  • Moved module code into __init__ file.

  • Updated history and tests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iso_language_codes-1.1.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

iso_language_codes-1.1.0-py2.py3-none-any.whl (11.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file iso_language_codes-1.1.0.tar.gz.

File metadata

  • Download URL: iso_language_codes-1.1.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for iso_language_codes-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fb4566791b8dd9a40b59f2e5ac3f2b9f3d13bdcb2bb8918ca25b5fb72116b77c
MD5 73b0f9d1444b8ac79a854d7c94d0e27c
BLAKE2b-256 76c0bc25d5fac42e6632f5cff514d156728bc8f29a68cb8025722f869b7533a7

See more details on using hashes here.

File details

Details for the file iso_language_codes-1.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: iso_language_codes-1.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for iso_language_codes-1.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 203b2cb7bd849cdfd3e821a802f9d89c69d0dba7bbe41a8427c9d3e3292bcaa2
MD5 93f787ac42ca1202d5cdeac0c2644026
BLAKE2b-256 b08a2e0d1c3981afb5e17bb3026e649318744e5d428ba82e025f50ea933b4166

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page