{ "info": { "author": "Walter Doekes, OSSO B.V.", "author_email": "wjdoekes+pyl10n@osso.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Localization" ], "description": "PYL10N\n------\n\nPyl10n is a localization (l10n) library for python, written in 2008-2010.\n\nBEWARE: This is old code, migrated to git. Previously, this was found at:\nhttps://code.osso.nl/projects/pyl10n\n\n\nSUMMARY\n-------\n\nPyl10n intends to replace the standard locale module which is not thread\nsafe (locale.setlocale() updates the entire process' locale settings).\nPyl10n allows you to supply the language setting at conversion function\ncall time or through a callback function that allows you to have a\nthread-specific language. E.g. for Django you could pass\n``django.utils.translation.get_language`` which gets the currently\nselected language.\n\nIts a complement to `gettext` solutions that do not depend on\nprocess-wide language settings.\n\n\nPORTABILITY\n-----------\n\nPyl10n has been tested with python 2.5 through 2.7 on Debian/Ubuntu\nLinux systems. It's been known to work with Python 3 as well.\n\n\nEXAMPLE\n-------\n\nImport pyl10n as locale:\n\n.. code-block:: pycon\n\n >>> import pyl10n as locale\n\nHardcode the current thread locale.\n\n.. code-block:: pycon\n\n >>> locale.setlocale('nl_NL')\n >>> print(locale.currency(12345.67))\n \u20ac 12345,67\n\nUsually you'll want to set a function that returns the current thread\nlocale.\n\n.. code-block:: pycon\n\n >>> getlocale = lambda: 'en_US'\n >>> locale.setlocalefunc(getlocale)\n >>> print(locale.format('%f', 12345.67, True, True))\n 12,345.67\n\nIf you're using your own locale files, you may set up the path like this:\n\n.. code-block:: console\n\n $ ls path/to/locale/en/ -1p\n LC_ADDRESS\n LC_MEASUREMENT\n LC_MESSAGES/\n LC_MONETARY\n LC_NAME\n LC_NUMERIC\n LC_PAPER\n LC_TELEPHONE\n LC_TIME\n\n.. code-block:: pycon\n\n >>> locale.setlocalepath('path/to/locale')\n >>> locale.setlocale('en')\n >>> locale.teldom2string((31, 50, 1234567))\n '(50) 1234567'\n >>> locale.setlocale('sv')\n >>> locale.teldom2string((31, 50, 1234567))\n '050-1234567'\n\nThe data files are stored/read using pickle.\n\n\nLIMITATIONS\n-----------\n\nAs of this writing, it is not complete yet. It does implement\n``format()`` and ``currency()`` correctly (see\nhttp://bugs.python.org/issue1222 ) and it has most of the time\nformatting support that ``strftime(3)`` specifies.\n\nIn the near future (ha ha) it will support address formatting functions.\n\nLook at the lists of finished and unfinished functions in the source.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ossobv/pyl10n", "keywords": null, "license": "LGPLv3+", "maintainer": null, "maintainer_email": null, "name": "pyl10n", "package_url": "https://pypi.org/project/pyl10n/", "platform": "linux", "project_url": "https://pypi.org/project/pyl10n/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ossobv/pyl10n" }, "release_url": "https://pypi.org/project/pyl10n/1.0/", "requires_dist": null, "requires_python": null, "summary": "Pyl10n is a localization (l10n) library for python", "version": "1.0" }, "last_serial": 2012078, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "d21103c39cecfaef67bccc03d42050ec", "sha256": "eb372659f99117deebfc13e6f3bf6bc84e8a7b0ce90b2c5f3092311345fb7ea9" }, "downloads": -1, "filename": "pyl10n-1.0.tar.gz", "has_sig": false, "md5_digest": "d21103c39cecfaef67bccc03d42050ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138506, "upload_time": "2016-03-17T11:55:15", "url": "https://files.pythonhosted.org/packages/ac/64/0c01fa13e1d817f4f41cd4e32dcfdf1080ba077d7237b412fd8cfb5f40d4/pyl10n-1.0.tar.gz" } ], "1.0rc1": [ { "comment_text": "", "digests": { "md5": "8fdcfd303d5d61aae857b3e7b2c41bb4", "sha256": "42933dbfaa8a390ca942b644724850849e836190ceac3eb2bbde203dd917de75" }, "downloads": -1, "filename": "pyl10n-1.0rc1.tar.gz", "has_sig": false, "md5_digest": "8fdcfd303d5d61aae857b3e7b2c41bb4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138247, "upload_time": "2016-03-17T11:32:51", "url": "https://files.pythonhosted.org/packages/11/20/6c2b225d40ce9ba60fcfd1cf9454a2cca2208dca2be04935fd3e1cc0a88c/pyl10n-1.0rc1.tar.gz" } ], "1.0rc2": [ { "comment_text": "", "digests": { "md5": "90c426f8e4710a3f09cab76359a48e99", "sha256": "0f981d6becedf1afb5baf4c83c1b7c920acc99a8c5080d053d0a2dd4f6f88ffa" }, "downloads": -1, "filename": "pyl10n-1.0rc2.tar.gz", "has_sig": false, "md5_digest": "90c426f8e4710a3f09cab76359a48e99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138541, "upload_time": "2016-03-17T11:52:44", "url": "https://files.pythonhosted.org/packages/9e/df/b85c936199a852b00c91ab60c1588d62cbc82bba74ce5ffed5ecacbc68f7/pyl10n-1.0rc2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d21103c39cecfaef67bccc03d42050ec", "sha256": "eb372659f99117deebfc13e6f3bf6bc84e8a7b0ce90b2c5f3092311345fb7ea9" }, "downloads": -1, "filename": "pyl10n-1.0.tar.gz", "has_sig": false, "md5_digest": "d21103c39cecfaef67bccc03d42050ec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 138506, "upload_time": "2016-03-17T11:55:15", "url": "https://files.pythonhosted.org/packages/ac/64/0c01fa13e1d817f4f41cd4e32dcfdf1080ba077d7237b412fd8cfb5f40d4/pyl10n-1.0.tar.gz" } ] }