jdTranslationHelper


NamejdTranslationHelper JSON
Version 3.3 PyPI version JSON
download
home_page
SummaryA simple API for translating your programs
upload_time2023-01-23 09:51:41
maintainer
docs_urlNone
author
requires_python>=3.8
licenseBSD-2-Clause
keywords jakobdev translation localization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # jdTranslationHelper
With jdTranslationHelper you can translate your programs. The translation files are .lang files which has ths format:
```
key=Hello World
test=This is a test
```
The files are in a folder named after the language code e.g. en_GB.lang

Here is a example how to use this API:
```python
from jdTranslationHelper import jdTranslationHelper

translations = jdTranslationHelper()
translations.loadDirectory("/home/User/translations")
print(translatios.translate("test"))
```
If we place the above en_GB.lang file in /home/User/translations, it will print This is a test. You can create files for any language.

You can also call jdTranslationHelper with arguemnts:  
lang=The language which should be loaded. If not specified, it will use the system language.  
defaultLanguage=The language that will be usesd, if there is no file with the system language. Default is en_GB.  

translate takes this argument:  
default: That will be returned, if the given key doesn't exists.

You can get alls Strings with getStrings().

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "jdTranslationHelper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "JakobDev,translation,localization",
    "author": "",
    "author_email": "JakobDev <jakobdev@gmx.de>",
    "download_url": "https://files.pythonhosted.org/packages/63/9e/a5693f918b194f1f1969ec40ae274c4a5c5a0323b5758f80cc880bd8a561/jdTranslationHelper-3.3.tar.gz",
    "platform": null,
    "description": "# jdTranslationHelper\nWith jdTranslationHelper you can translate your programs. The translation files are .lang files which has ths format:\n```\nkey=Hello World\ntest=This is a test\n```\nThe files are in a folder named after the language code e.g. en_GB.lang\n\nHere is a example how to use this API:\n```python\nfrom jdTranslationHelper import jdTranslationHelper\n\ntranslations = jdTranslationHelper()\ntranslations.loadDirectory(\"/home/User/translations\")\nprint(translatios.translate(\"test\"))\n```\nIf we place the above en_GB.lang file in /home/User/translations, it will print This is a test. You can create files for any language.\n\nYou can also call jdTranslationHelper with arguemnts:  \nlang=The language which should be loaded. If not specified, it will use the system language.  \ndefaultLanguage=The language that will be usesd, if there is no file with the system language. Default is en_GB.  \n\ntranslate takes this argument:  \ndefault: That will be returned, if the given key doesn't exists.\n\nYou can get alls Strings with getStrings().\n",
    "bugtrack_url": null,
    "license": "BSD-2-Clause",
    "summary": "A simple API for translating your programs",
    "version": "3.3",
    "split_keywords": [
        "jakobdev",
        "translation",
        "localization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8241540b221376f7e82b02273f8ffd778c789f7583db178ecea1fad9ba6bcda9",
                "md5": "b4e04a2cd7174c73e4cd856a1ef6db5e",
                "sha256": "e452c65cc31f461477492abc4aa68a86d208b7107c339de896359933c1ed46de"
            },
            "downloads": -1,
            "filename": "jdTranslationHelper-3.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b4e04a2cd7174c73e4cd856a1ef6db5e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 4085,
            "upload_time": "2023-01-23T09:51:39",
            "upload_time_iso_8601": "2023-01-23T09:51:39.732943Z",
            "url": "https://files.pythonhosted.org/packages/82/41/540b221376f7e82b02273f8ffd778c789f7583db178ecea1fad9ba6bcda9/jdTranslationHelper-3.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "639ea5693f918b194f1f1969ec40ae274c4a5c5a0323b5758f80cc880bd8a561",
                "md5": "1a0bea06c124cb55aa300fec4f454e9c",
                "sha256": "adff391644eba41677dbbae06c42acc2bbe5c1cb7ca3d7e9764be7328ede346e"
            },
            "downloads": -1,
            "filename": "jdTranslationHelper-3.3.tar.gz",
            "has_sig": false,
            "md5_digest": "1a0bea06c124cb55aa300fec4f454e9c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3727,
            "upload_time": "2023-01-23T09:51:41",
            "upload_time_iso_8601": "2023-01-23T09:51:41.789318Z",
            "url": "https://files.pythonhosted.org/packages/63/9e/a5693f918b194f1f1969ec40ae274c4a5c5a0323b5758f80cc880bd8a561/jdTranslationHelper-3.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-23 09:51:41",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "jdtranslationhelper"
}
        
Elapsed time: 0.03489s