Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

iso-language-codes

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iso-language-codes

Get ISO code for a given language

  • 1.1.0
  • PyPI
  • Socket score

Maintainers
1

================== ISO Language Codes

.. image:: https://img.shields.io/pypi/v/iso_language_codes.svg :target: https://pypi.python.org/pypi/iso_language_codes

.. image:: https://img.shields.io/travis/kirinokirino/iso_language_codes.svg :target: https://travis-ci.org/kirinokirino/iso_language_codes

.. image:: https://readthedocs.org/projects/iso-language-codes/badge/?version=latest :target: https://iso-language-codes.readthedocs.io/en/latest/?badge=latest :alt: 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.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _audreyr/cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage .. _bbqsrc/iso639-autonyms: https://github.com/bbqsrc/iso639-autonyms

======= 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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc