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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

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