.. image:: https://readthedocs.org/projects/loc/badge/?version=latest
    :target: https://loc.readthedocs.io/?badge=latest
    :alt: Documentation Status

.. image:: https://travis-ci.org/MacHu-GWU/loc-project.svg?branch=master
    :target: https://travis-ci.org/MacHu-GWU/loc-project?branch=master

.. image:: https://codecov.io/gh/MacHu-GWU/loc-project/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/MacHu-GWU/loc-project

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

.. image:: https://img.shields.io/pypi/l/loc.svg
    :target: https://pypi.python.org/pypi/loc

.. image:: https://img.shields.io/pypi/pyversions/loc.svg
    :target: https://pypi.python.org/pypi/loc

.. image:: https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
    :target: https://github.com/MacHu-GWU/loc-project

------


.. image:: https://img.shields.io/badge/Link-Document-blue.svg
      :target: https://loc.readthedocs.io/index.html

.. image:: https://img.shields.io/badge/Link-API-blue.svg
      :target: https://loc.readthedocs.io/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Source_Code-blue.svg
      :target: https://loc.readthedocs.io/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
      :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
      :target: https://github.com/MacHu-GWU/loc-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
      :target: https://github.com/MacHu-GWU/loc-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
      :target: https://github.com/MacHu-GWU/loc-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
      :target: https://pypi.org/pypi/loc#files


Welcome to ``loc`` Documentation
==============================================================================

``loc`` is a library that simplify the software localization.

Usage:

.. code-block:: python

    >>> from loc import LocDict
    >>> data = [
            {"en-US": "Yes", "zh-CN": "是"},
            {"en-US": "No", "zh-CN": "否"},
        ]

    >>> ld = LocDict(data=data)
    >>> ld.trans_to("Yes", dst_loc="zh-CN")
    是


.. _install:

Install
------------------------------------------------------------------------------

``loc`` is released on PyPI, so all you need is:

.. code-block:: console

    $ pip install loc

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade loc