{
"info": {
"author": "Grzegorz Babiarz",
"author_email": "programista3@outlook.com",
"bugtrack_url": null,
"classifiers": [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3"
],
"description": "# python-lang\nA simple library for building multilingual applications in Python\n## Installation\n### Using `pip`\n`pip install python-lang`\n### From the source\n- Clone the repo `git clone https://github.com/Programista3/python-lang.git`\n- Run `python setup.py install`\n## Usage\n#### `.py` file\nAdd pyLang to your project\n```python\nimport python_lang as lang\n_ = lang.get\n```\nAdd language files (you can specify the language symbol as the second parameter)\n```python\nlang.add(\"C:/project/locales/de.xml\")\nlang.add(\"C:/project/locales/pl.xml\", \"pl\")\n```\nSelect language for translation\n```python\nlang.select('pl')\n```\nYou can turn off the translation using\n```python\nlang.select()\n```\nUse `_()` function to translate text\n```python\nprint(_(\"Hello World\"))\n```\nYou can view the list of added languages using\n```python\nlang.all()\n```\n#### `XML` file\nUse following template:\n```xml\n\n\n first translated text\n second translated text\n ...\n\n```\n## Documentation\n### Functions\nlang.**add(path, code=None)**
\n Adds path and language code to the list of languages.
\n Returns True if the language has been added successfully.
\nlang.**all()**
\n Returns the list of added languages
\nlang.**get(text)**
\n Returns translated text (if not found translation or language is not selected returns original text)
\nlang.**select(lang=None)**
\n Selects the language used to translation.
\n Returns True if the language has been selected successfully.
\n### Variables\nlang.**file**
\n Contains the parsed file of the currently selected language
\nlang.**langs**
\n Contains the list of added languages with their file paths
\nlang.**selected**
\n Contains the code of the currently selected language\n\n\n",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/Programista3/python-lang",
"keywords": "",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "python-lang",
"package_url": "https://pypi.org/project/python-lang/",
"platform": "",
"project_url": "https://pypi.org/project/python-lang/",
"project_urls": {
"Homepage": "https://github.com/Programista3/python-lang"
},
"release_url": "https://pypi.org/project/python-lang/1.0.0/",
"requires_dist": null,
"requires_python": "",
"summary": "A simple library for building multilingual applications in Python",
"version": "1.0.0"
},
"last_serial": 5621070,
"releases": {
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "7c104d2f406a8318505673ccf1123081",
"sha256": "1cb9723b2fd6a1e67952664434d3abd40206907d6919744df445da9fd990e187"
},
"downloads": -1,
"filename": "python_lang-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c104d2f406a8318505673ccf1123081",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3319,
"upload_time": "2019-08-01T22:10:45",
"url": "https://files.pythonhosted.org/packages/8d/c3/868584278b5264cd318c3d20d65c0210796680278a3cd7c3ee9b31dce904/python_lang-1.0.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "5f36b0f451d63f364143840396cb69df",
"sha256": "1431d26abfa05b49d32c097e275f6be370e7490386d3c650870f0cbcd4381f40"
},
"downloads": -1,
"filename": "python-lang-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "5f36b0f451d63f364143840396cb69df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2373,
"upload_time": "2019-08-01T22:10:47",
"url": "https://files.pythonhosted.org/packages/32/c1/e8fabcb83a7c57feeb8a78d9c45598e6937502867f987274a92ecc1669e9/python-lang-1.0.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "7c104d2f406a8318505673ccf1123081",
"sha256": "1cb9723b2fd6a1e67952664434d3abd40206907d6919744df445da9fd990e187"
},
"downloads": -1,
"filename": "python_lang-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c104d2f406a8318505673ccf1123081",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3319,
"upload_time": "2019-08-01T22:10:45",
"url": "https://files.pythonhosted.org/packages/8d/c3/868584278b5264cd318c3d20d65c0210796680278a3cd7c3ee9b31dce904/python_lang-1.0.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "5f36b0f451d63f364143840396cb69df",
"sha256": "1431d26abfa05b49d32c097e275f6be370e7490386d3c650870f0cbcd4381f40"
},
"downloads": -1,
"filename": "python-lang-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "5f36b0f451d63f364143840396cb69df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2373,
"upload_time": "2019-08-01T22:10:47",
"url": "https://files.pythonhosted.org/packages/32/c1/e8fabcb83a7c57feeb8a78d9c45598e6937502867f987274a92ecc1669e9/python-lang-1.0.0.tar.gz"
}
]
}